Created
September 15, 2019 08:47
-
-
Save heysamtexas/2f81ba9919b1b8ed061a59251ecf2453 to your computer and use it in GitHub Desktop.
Awesome Traefik config for docker-compose and letsencrypt
This file contains 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' | |
services: | |
traefik: | |
image: traefik:1.7.9 | |
restart: always | |
ports: | |
- 80:80 | |
- 443:443 | |
- 8080:8080 | |
networks: | |
- web | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- ./acme.json:/acme.json | |
- ./logs:/logs | |
container_name: traefik | |
command: | |
- --debug=false | |
- --logLevel=INFO | |
- --defaultentrypoints=https,http | |
- --entryPoints=Name:http Address::80 Redirect.EntryPoint:https | |
- --entryPoints=Name:https Address::443 Compress:true TLS | |
- --retry | |
- --docker.endpoint=unix:///var/run/docker.sock | |
- --docker.domain=${DOCKER_DOMAIN} | |
- --docker.watch=true | |
- --docker.exposedbydefault=false | |
- --acme.email=${EMAIL} | |
- --acme.storage=acme.json | |
- --acme.entryPoint=https | |
- --acme.onHostRule=true | |
- --acme.httpchallenge.entrypoint=http | |
- --accesslog | |
- --accesslog.format=json | |
- --accesslog.filepath=logs/accesslog.json | |
- --traefiklog.filepath=logs/traefiklog.json | |
- --traefiklog.format=json | |
networks: | |
web: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment