Skip to content

Instantly share code, notes, and snippets.

@johackim johackim/traefik-ssl.yml
Last active Mar 8, 2020

Embed
What would you like to do?
version: "3.7"
services:
consul:
image: consul:1.7.1
command: agent -server -bootstrap-expect=1
environment:
- CONSUL_BIND_INTERFACE=eth0
- CONSUL_CLIENT_INTERFACE=eth0
volumes:
- ${VOLUME_PATH}consul:/consul/data
networks:
- internal
traefik:
image: traefik:${VERSION:-v1.7.21-alpine}
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
command:
- --entryPoints=Name:http Address::80 Compress:true Redirect.EntryPoint:https
- --entryPoints=Name:https Address::443 Compress:true TLS
- --defaultEntryPoints=https,http
- --docker.swarmmode=true
- --docker.exposedbydefault=false
- --docker.network=traefik-net
- --consul
- --consul.endpoint=consul:8500
- --consul.prefix=traefik
- --acme
- --acme.onHostRule=true
- --acme.storage=traefik/acme/account
- --acme.acmeLogging=true
- --acme.entryPoint=https
- --acme.httpChallenge.entryPoint=http
- --acme.email=${ACME_EMAIL:-noreply@ethibox.fr}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
deploy:
mode: ${MODE:-replicated}
placement:
constraints: [node.role==manager]
networks:
- internal
- traefik
volumes:
consul:
networks:
internal:
traefik:
external: true
name: traefik-net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.