-
First Check
Commit to Help
Example Code
DescriptionI followed the backend/development.md to change the domain. But even after doing
or
I can see that traefik is still trying to only serve on localhost. Accessing my custom domain returns a 404 Curiously, on the traefik dashboard, only the backend has the updated STACK_NAME applied to my backend, and all the rest still retained the project default stack name: But no matter, as you can see, it is still trying to serve on localhost despite the fact that my env file changed to use a different domain. Am I missing some configurations? Can someone help? Operating SystemWindows Operating System DetailsDocker version 26.0.0, build 2ae903e Python VersionPython 3.12.2 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@yohaoquan I might have the answer for you. There seems some misconfiguration within the env_file:
- .env
environment:
- DOMAIN=${DOMAIN} By priority it takes DOMAIN from your host env variables first and overwrites the one in the .env when you run Try to execute Actually, I am not sure why both are defined in the You can remove the following line and it should work fine: - DOMAIN=${DOMAIN} @tiangolo why do you declare the |
Beta Was this translation helpful? Give feedback.
@yohaoquan I might have the answer for you. There seems some misconfiguration within the
docker-compose.yml
file. Currently it is defined as:env_file: - .env environment: - DOMAIN=${DOMAIN}
By priority it takes DOMAIN from your host env variables first and overwrites the one in the .env when you run
docker compose up
.Try to execute
echo $DOMAIN
on your host environment and see whats coming there.Actually, I am not sure why both are defined in the
docker-compose.yml
file.You can remove the following line and it should work fine:
- DOMAIN=${DOMAIN}
@tiangolo why do you declare the
environment
and the.env
file indocker-compose.yml
?