Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@MightyPork
Last active June 11, 2018 20:37
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 MightyPork/ea5bbb8af8720327e530b171035c62ac to your computer and use it in GitHub Desktop.
Save MightyPork/ea5bbb8af8720327e530b171035c62ac to your computer and use it in GitHub Desktop.
version: '3'
services:
nginx:
image: 'nginx:alpine'
restart: always
networks:
- web
labels:
- "traefik.docker.network=traefik"
- "traefik.backend=blog"
- "traefik.frontend.rule=Host:test.ondrovo.com"
- "traefik.port=80"
- "traefik.frontend.passHostHeader=true"
- "traefik.protocol=http"
- "traefik.frontend.redirect=https"
volumes:
- ./www/:/srv/blog/www/
networks:
web:
external:
name: traefik
defaultEntryPoints = ["http", "https"]
[web]
address = ":8080"
[web.auth.basic]
users = ["***"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
email = "ondra@ondrovo.com"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
onDemand = false
[acme.httpChallenge]
entryPoint = "http"
delayBeforeCheck = 0
[[acme.domains]]
main = "test.ondrovo.com"
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "docker.local"
watch = true
version: '2'
services:
proxy:
image: traefik
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
- ./acme.json:/acme.json
networks:
- traefik
labels:
- "traefik.enable=false"
networks:
traefik:
external:
name: traefik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment