2019-08-06 15:46:04 +00:00
|
|
|
version: "3.3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
traefik:
|
2019-09-12 14:22:03 +00:00
|
|
|
image: "traefik:v2.0.0-rc3"
|
2019-08-06 15:46:04 +00:00
|
|
|
container_name: "traefik"
|
|
|
|
command:
|
|
|
|
#- "--log.level=DEBUG"
|
2019-09-12 14:22:03 +00:00
|
|
|
- "--api.insecure=true"
|
2019-08-06 15:46:04 +00:00
|
|
|
- "--providers.docker=true"
|
|
|
|
- "--providers.docker.exposedbydefault=false"
|
|
|
|
- "--entrypoints.websecure.address=:443"
|
|
|
|
- "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
|
|
|
|
#- "--certificatesresolvers.mytlschallenge.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
|
|
|
|
- "--certificatesresolvers.mytlschallenge.acme.email=postmaster@mydomain.com"
|
|
|
|
- "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
|
|
|
|
ports:
|
|
|
|
- "443:443"
|
|
|
|
- "8080:8080"
|
|
|
|
volumes:
|
|
|
|
- "./letsencrypt:/letsencrypt"
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
|
|
|
|
|
|
whoami:
|
|
|
|
image: "containous/whoami"
|
|
|
|
container_name: "simple-service"
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.whoami.rule=Host(`whoami.mydomain.com`)"
|
|
|
|
- "traefik.http.routers.whoami.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.whoami.tls.certresolver=mytlschallenge"
|