3

I'm trying to achieve the following setup:

I have a center stack containing my nginx-proxy stuff. This stack declares a network (let's call it nginx_proxy_net)

Next, I want to setup 2 stacks for 2 wordpress installs, each one of them is totally independant and contains its own wordpress service & mysql service. Both wordpress use the nginx_proxy_net network.

When I try to start my 2 stacks, the following happens:

  1. The first wordpress stack starts successfully. So far so good
  2. The second wordpress stack refuse to start because both port 3306 (mysql) & 80 (wordpress) are already in use. The error is: Error response from daemon: rpc error: code = 3 desc = port '80' is already in use by service 'nginx_proxy_nginx-proxy' (n1ncrh8igvew4advk650dwjdr) as an ingress port

I've understood that each exported port is binded on the routing mesh, and I've also understood that you can link your service on several network. So I tried to create a network for each stack, so there is, on each of those stack network, a single MySQL & a single Apache.

I'm not very experienced with Docker, so maybe I'm about to ask something really stupid: is it possible to expose my ports ONLY on my stacks networks, and not on the ingress? How can I set up my stacks to be, for each, independent from the others?

Thank you very much, have a nice day

Alex

0 Answers0