Multiple instances of Redmine on Docker Multiple instances of Redmine on Docker docker docker

Multiple instances of Redmine on Docker


If you want to run 2 web-server (docker container) on the same machine under the same ip-address and port you have to add a reverse proxy like HAProxy to your configuration. This is because the network connection will always be based on your servers IP and the port (80, 443 for web). But the HTTP(s) request will contain the hostname. A reverse proxy like HAProxy takes the HTTP request, looks at the hostname and forwards the request to the container wich may have a different port or even a different IP address (You could forward the request to the containers internal IP, this way no port mapping would be required).

Your certificates will also be served by the load-balancer, which may this way function as HTTPS termiation proxy.

This would be the request flow:

                         ┌-> Container 1Client --> ReverseProxy -|                         └-> Container 2
  • Your ReverseProxy (eg. HaProxy) listens on your public ip and port 80/443.
  • The both container are only reachable on your host and may be accessd via their internal docker ip or a prot mapping.