You most likely need to set the hostname that Duplicati should accept:
environment:
- DUPLICATI__WEBSERVICE_INTERFACE=any
- DUPLICATI__WEBSERVICE_ALLOWED_HOSTNAMES: example.com;other.example.com
This is described in the docs:
https://docs.duplicati.com/detailed-descriptions/using-duplicati-from-docker#hostname-access