Specifying the site URL for a fresh install

I’m using the mautic/mautic:v4 docker image.

I’m using Nginx in a separate container to provide SSL termination. When I navigate to Mautic using my fully qualified domain name, Mautic is redirecting to “http://mautic/index.php/installer”. I’ve tried multiple variable names in the environment section of the docker-compose.yml file I’m using, but none make any difference. I’m using a bind mount to persist the config and have tried adding ‘site_url’ => ‘https://mautic.mydomain.com’ to the local.php file, but this makes no difference. I’m clearing browser history between attempts, so that the 301 redirects are not cached.

I had in a previous attempt been able to manually change the URL redirected to to include my domain name, but this no longer works and I can’t get to the install screen.

How is the site’s URL meant to be set in the docker-compose.yml so that it’s available for the installer? None of the docker-compose examples I see have this, so I can’t understand how this works for anyone.

As a supplemental question; why doesn’t Mautic use the hostname from the request to understand it’s fully qualified domain name?