Skip to content

Instantly share code, notes, and snippets.

@llonchj
Last active November 29, 2017 00:44
Show Gist options
  • Save llonchj/6750514d9fe03c3e2304a55e711b0b9c to your computer and use it in GitHub Desktop.
Save llonchj/6750514d9fe03c3e2304a55e711b0b9c to your computer and use it in GitHub Desktop.
version: '3'
services:
nginx:
image: nginx
labels:
traefik.backend: nginx
traefik.frontend.rule: Host:nginx.local
traefik.enable: "true"
traefik-with-prometheus-metrics:
image: traefik:morbier
labels:
traefik.backend: traefik-with-prometheus-metrics
traefik.frontend.rule: Host:traefik-with-prometheus-metrics.local
traefik.port: "8080"
traefik.enable: "true"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
command: |
--web
--web.metrics.prometheus
--docker.watch
--docker.exposedbydefault=false
--entrypoints='Name:http Address::80 Redirect.EntryPoint:https'
--entrypoints='Name:https Address::443'
--defaultentrypoints=https,http
--loglevel=INFO
traefik:
image: traefik:morbier
labels:
traefik.backend: traefik
traefik.frontend.rule: Host:traefik.local
traefik.port: "8080"
traefik.enable: "true"
ports:
- "81:80"
- "8081:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
command: |
--web
--docker.watch
--docker.exposedbydefault=false
--entrypoints='Name:http Address::80 Redirect.EntryPoint:https'
--entrypoints='Name:https Address::443'
--defaultentrypoints=https,http
--loglevel=INFO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment