Answer the question
In order to leave comments, you need to log in
How to properly organize multiple nginx virtual hosts in Docker?
From docker's point of view, each process is a separate container.
1. Does this mean that each individual site should run in a separate container?
2. If item 1 is yes, then how to scatter between these containers the users of the control machine that are hollowed out on 80/443 ports?
3. If there is no item 1, then how to properly separate the automated integration of applications?
Answer the question
In order to leave comments, you need to log in
Each application can be run in a separate application, or in one, a matter of taste. The problem is that all applications want 80/443 port.
To solve this problem, you can start one container with nginx and configure it as a reverse proxy, i.e. it will take ports and scatter requests across containers based on the host address.
I can recommend a ready-made image for this https://github.com/jwilder/nginx-proxy
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question