Skip to content

Instantly share code, notes, and snippets.

@yangm97
Created February 18, 2018 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangm97/335b42f7596a3838e41105b7da4ce764 to your computer and use it in GitHub Desktop.
Save yangm97/335b42f7596a3838e41105b7da4ce764 to your computer and use it in GitHub Desktop.
version: '3.2'
services:
traefik:
image: traefik
command:
- --accesslog=true
# - --logLevel=DEBUG
- --docker
- --docker.swarmmode
- --docker.domain=synko.com.br
- --docker.watch
- --web
- --acme=true
- --acme.email=yangm97@gmail.com
- --acme.entryPoint=https
- --acme.ondemand=true
- --acme.storage=/certs/acme.json
- --defaultEntryPoints=https,http
- --entryPoints=Name:https Address::443 TLS
- --entryPoints=Name:http Address::80 Redirect.EntryPoint:https
deploy:
mode: global
placement:
constraints:
- node.role == manager
networks:
- staging_default
- production_default
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- certs:/certs
- /var/run/docker.sock:/var/run/docker.sock
volumes:
certs:
networks:
staging_default:
external: true
production_default:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment