Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save daniellavoie/fb02aa3cfe4751759ad523d914c97bac to your computer and use it in GitHub Desktop.

Select an option

Save daniellavoie/fb02aa3cfe4751759ad523d914c97bac to your computer and use it in GitHub Desktop.
version: "3"
services:
traefik:
image: traefik:1.4
depends_on:
- traefik_init
- consul
command:
- "--web"
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
- "--entrypoints=Name:https Address::443 TLS"
- "--defaultentrypoints=http,https"
- "--acme"
- "--acme.storage=/etc/traefik/acme/acme.json"
- "--acme.entryPoint=https"
- "--acme.OnHostRule=true"
- "--acme.onDemand=false"
- "--acme.email=contact@jmaitrehenry.ca"
- "--docker"
- "--docker.swarmmode"
- "--docker.domain=jmaitrehenry.ca"
- "--docker.watch"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- webgateway
- traefik
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
- target: 8080
published: 8080
mode: host
deploy:
mode: global
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
networks:
webgateway:
driver: overlay
external: true
traefik:
driver: overlay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment