Skip to content

Docker swarm and Error: nginx-proxy container nginx_proxy isn't running. #998

Open
@indapublic

Description

@indapublic

Hey! Decided to try your awesome library (which has been running successfully on my servers for a long time) on the swarm docker and so far it doesn’t work

docker network create nginx-proxy --driver=overlay --scope=swarm
docker service create \
--name nginx_proxy \
--network nginx-proxy \
--mount type=bind,src=//usr/local/share/nginx-proxy/nginx-proxy/data/certs,dst=/etc/nginx/certs \
--mount type=bind,src=//usr/local/share/nginx-proxy/nginx-proxy/data/vhost,dst=/etc/nginx/vhost.d \
--mount type=bind,src=//usr/local/share/nginx-proxy/nginx-proxy/data/html,dst=/usr/share/nginx/html \
--mount type=bind,src=//var/run/docker.sock,dst=/tmp/docker.sock \
--publish 80:80 \
--publish 443:443 \
nginxproxy/nginx-proxy
docker service create \
--name nginx_proxy_acme_companion \
--network nginx-proxy \
--mount type=bind,src=//usr/local/share/nginx-proxy/nginx-proxy/data/certs,dst=/etc/nginx/certs \
--mount type=bind,src=//usr/local/share/nginx-proxy/nginx-proxy/data/vhost,dst=/etc/nginx/vhost.d \
--mount type=bind,src=//usr/local/share/nginx-proxy/nginx-proxy/data/html,dst=/usr/share/nginx/html \
--mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \
--env NGINX_PROXY_CONTAINER=nginx_proxy \
--env NGINX_DOCKER_GEN_CONTAINER=nginx_proxy \
--env [email protected] \
nginxproxy/acme-companion

In logs I see

nginx_proxy_acme_companion.1.n9ez87yebulp@alpha    | 2023/02/22 07:57:08 Error: nginx-proxy container nginx_proxy isn't running.

Tried label, NGINX_PROXY_CONTAINER/NGINX_DOCKER_GEN_CONTAINER but nothing helps. Could you give me good advise how to sort it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions