version: "3.7" | |
services: | |
traefik: | |
image: traefik:${VERSION:-v1.7.24-alpine} | |
ports: | |
- { target: 80, published: 80, mode: host, protocol: tcp } | |
- { target: 443, published: 443, mode: host, protocol: tcp } | |
command: | |
# - --debug | |
# - --loglevel=INFO | |
- --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 | |
- --metrics.prometheus=true | |
- --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:-insert-your-email-here@provider.com} | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
deploy: | |
mode: ${MODE:-replicated} | |
placement: | |
constraints: [node.role==manager] | |
networks: | |
- internal | |
- traefik | |
consul: | |
image: consul:1.7.2 | |
command: agent -server -bootstrap-expect=1 | |
environment: | |
CONSUL_BIND_INTERFACE: eth0 | |
CONSUL_CLIENT_INTERFACE: eth0 | |
CONSUL_LOCAL_CONFIG: '{ "limits": { "txn_max_req_len": 1024000, "kv_max_value_size": 1024000 } }' # To fix : StoreConfig error: Unexpected response code: 413 (Request body(526197 bytes) too large, max size: 524288 bytes | |
volumes: | |
- ${VOLUME_PATH}consul:/consul/data | |
networks: | |
- traefik | |
- internal | |
volumes: | |
consul: | |
networks: | |
internal: | |
driver: overlay | |
attachable: true | |
traefik: | |
external: true | |
name: traefik-net |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment