My Docker Version :
Client:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 21:44:32 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 21:44:32 2016
OS/Arch: linux/amd64
I'm Using Swarm across 2 Machines
, and i deploy this jwilder/nginx-proxy using this command :
docker service create --mode global --name proxy -p 80:80 --network backend \
--mount type=bind,source=/var/run/docker.sock,destination=/tmp/docker.sock,readonly \
--mount type=bind,source=/mnt,destination=/etc/nginx/conf.d jwilder/nginx-proxy
and it's working great, every i create a service using "VIRTUAL_HOST"
because the nginx-proxy installed as global (installed on every swarm node) need to share the
configuration of /etc/nginx/conf.d/default.conf over swarm node,
i already solve it using GlusterFS . but there are following issues,
every this nginx-proxy spawned, this is executing docker-gen and overwrite /etc/nginx/conf.d/default.conf to default, and wipe out the existing configuration .
and i try to build using this Dockerfile , but when i run the result image . nothing happened, there are no log or error, just exited after i run it. am i missing something?
Thank you
nginx-proxy is not designed to work with Swarm. The Traefik project would do what you want.
@thomasleveil Traefik is not totally the solution... Currently no http to https redirection per container. If you activate http to https redirection, it happens for all container. Moreover the http status code returned is 302, instead of 301...
Checkout https://github.com/jwilder/nginx-proxy/issues/927#issuecomment-391334432
Most helpful comment
nginx-proxy is not designed to work with Swarm. The Traefik project would do what you want.