Skip to content

Instantly share code, notes, and snippets.

@clintcolding
Created November 6, 2019 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save clintcolding/cc576d936c5907ffde4432964476088b to your computer and use it in GitHub Desktop.
Save clintcolding/cc576d936c5907ffde4432964476088b to your computer and use it in GitHub Desktop.
Traefik example
version: '3'
services:
reverse-proxy:
# The official v2.0 Traefik docker image
image: traefik:v2.0
command:
- --api.insecure=true
- --providers.docker
- --providers.file.directory=/etc/traefik/dynamic
- --entryPoints.web.address=:81
- --entryPoints.websecure.address=:443
ports:
# Expose 81 since Windows System process is using 80 ¯\_(ツ)_/¯
- "81:80"
# Expose 443 for TLS
- "443:443"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# Allows Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
# Mount the dynamic configuration
- C:\data\certs-traefik.yaml:/etc/traefik/dynamic/certs-traefik.yaml
# Mount the directory containing the certs
- C:\certs\:/etc/certs/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment