Created
November 29, 2017 13:34
-
-
Save jmaitrehenry/4c026f02a4516ac72e205ea867728ef7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.4" | |
services: | |
traefik_init: | |
image: traefik:1.4.3 | |
command: | |
- "storeconfig" | |
- "--logLevel=DEBUG" | |
- "--web" | |
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https" | |
- "--entrypoints=Name:https Address::443 TLS" | |
- "--defaultentrypoints=http,https" | |
- "--acme" | |
- "--acme.storage=traefik/acme/account" | |
- "--acme.entryPoint=https" | |
- "--acme.OnHostRule=true" | |
- "--acme.onDemand=false" | |
- "[email protected]" | |
- "--docker" | |
- "--docker.swarmmode" | |
- "--docker.domain=jmaitrehenry.ca" | |
- "--docker.watch" | |
- "--consul" | |
- "--consul.endpoint=consul:8500" | |
- "--consul.prefix=traefik" | |
- "--debug" | |
networks: | |
- traefik | |
deploy: | |
restart_policy: | |
condition: on-failure | |
depends_on: | |
- consul | |
traefik: | |
image: traefik | |
depends_on: | |
- traefik_init | |
- consul | |
command: | |
- "--consul" | |
- "--consul.endpoint=consul:8500" | |
- "--consul.prefix=traefik" | |
- "--acme.storage=traefik/acme/account" | |
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 | |
restart_policy: | |
condition: on-failure | |
consul: | |
image: consul | |
command: agent -server -bootstrap-expect=1 | |
volumes: | |
- consul-data:/consul/data | |
environment: | |
- CONSUL_LOCAL_CONFIG={"datacenter":"us_east2","server":true} | |
- CONSUL_BIND_INTERFACE=eth0 | |
- CONSUL_CLIENT_INTERFACE=eth0 | |
deploy: | |
replicas: 1 | |
placement: | |
constraints: | |
- node.role == manager | |
update_config: | |
parallelism: 1 | |
delay: 10s | |
restart_policy: | |
condition: on-failure | |
networks: | |
- traefik | |
networks: | |
webgateway: | |
driver: overlay | |
external: true | |
traefik: | |
driver: overlay | |
volumes: | |
consul-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment