Skip to content

Emulating production environment on local machine with Docker #4230

Answered by AllenEllis
AllenEllis asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, ok I think I've answered my own question.

Setting my FQDN to 127.0.0.1 in my /etc/hosts file is the key trick. The others aren't accurate because those containers don't expose their ports directly anyway.

It looks like what happened is I wasn't waiting long enough for my Django container to finish booting up. My production container is set to push to S3, and I believe the collectstatic action was working in the background and so that's why traefik was (correctly) reporting that my django container was not yet ready to receive traffic.

After waiting about 4 minutes, it finished booting and it appears to be working!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AllenEllis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant