Answer the question
In order to leave comments, you need to log in
How to set up a Docker-compose (Nginx, Django, Unicorn, Postgres) bundle so that different projects (not just django) are opened on different domains?
Good afternoon. I don't even know how difficult this question is. I have been looking for information for about 4 days, but all in vain.
Suppose I make a bunch according to the following instructions: https://testdriven.io/blog/dockerizing-django-with...
There is a repository on the github at the end.
But according to this instruction, to open the site, you must also enter the port after the domain name.
I went further:
1. Created a network: docker network create nginx-proxy
2. In a separate composition, I made a setting for Nginx so that it listens on ports 80 and 443 and config:
Answer the question
In order to leave comments, you need to log in
1) in order not to enter a port after the domain, container nginx must be forced to listen on port 80, not 1337, or install another nginx on the host that would proxy certain requests to 1337
2) so that nginx can distribute static from another container, these containers should be total volume
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question