Skip to content

Instantly share code, notes, and snippets.

@ivorscott
Created June 5, 2020 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivorscott/fd21d7c4b96ed9042533221291d3836c to your computer and use it in GitHub Desktop.
Save ivorscott/fd21d7c4b96ed9042533221291d3836c to your computer and use it in GitHub Desktop.
traefik:
image: traefik:v2.1.2
command:
- "--api.insecure=true" # Not For Production
- "--api.debug=true"
- "--log.level=DEBUG"
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=traefik-public"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.api.local`)"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https@docker"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment