Skip to content
Snippets Groups Projects
Select Git revision
  • 0bfcbf7c73309308dcfab82ee53f2fbc3d1adee2
  • master default protected
2 results

nginx-config

  • Clone with SSH
  • Clone with HTTPS
  • Dmytro Bogatov's avatar
    Dmytro Bogatov authored
    0bfcbf7c
    History

    NGINX

    How add to swarm

    Make sure the overlay network is created

    docker network create \
    	--driver overlay \
    	--attachable \
    	internal-network

    Deploy the service

    docker service create \
    	--name nginx \
    	--publish 80:80 \
    	--publish 443:443 \
    	--mount type=bind,source=/etc/letsencrypt/,target=/etc/letsencrypt/,readonly \
    	--mount type=bind,source=/etc/ssl/certs/dhparam.pem,target=/etc/ssl/certs/dhparam.pem,readonly \
    	--constraint 'node.role == manager' \
    	--network internal-network \
    	registry.dbogatov.org/dbogatov/nginx-config:latest

    Update the service

    docker pull registry.dbogatov.org/dbogatov/nginx-config:latest
    docker service update --image registry.dbogatov.org/dbogatov/nginx-config:latest nginx