In my docker-compose there is a nginx proxy container definition:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
I would like to define this container in multiple docker-compose.yml file (one per project).
How can I do that, without stopping each time the container (because is using the port 80)? The idea is: if there are no nginx-proxy
containers running, run this, otherwise use the running one.