2019-08-06 15:46:04 +00:00
|
|
|
version: "3.3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
traefik:
|
2022-09-14 14:52:03 +00:00
|
|
|
image: "traefik:v2.9"
|
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.web.address=:80"
|
|
|
|
- "--entrypoints.websecure.address=:443"
|
2020-02-17 10:04:04 +00:00
|
|
|
- "--certificatesresolvers.myresolver.acme.dnschallenge=true"
|
|
|
|
- "--certificatesresolvers.myresolver.acme.dnschallenge.provider=ovh"
|
|
|
|
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
|
2020-03-13 21:50:05 +00:00
|
|
|
- "--certificatesresolvers.myresolver.acme.email=postmaster@example.com"
|
2020-02-17 10:04:04 +00:00
|
|
|
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
|
2019-08-06 15:46:04 +00:00
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
- "8080:8080"
|
|
|
|
environment:
|
|
|
|
- "OVH_ENDPOINT=xxx"
|
|
|
|
- "OVH_APPLICATION_KEY=xxx"
|
|
|
|
- "OVH_APPLICATION_SECRET=xxx"
|
|
|
|
- "OVH_CONSUMER_KEY=xxx"
|
|
|
|
volumes:
|
|
|
|
- "./letsencrypt:/letsencrypt"
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
|
|
|
|
|
|
whoami:
|
2020-09-16 13:46:04 +00:00
|
|
|
image: "traefik/whoami"
|
2019-08-06 15:46:04 +00:00
|
|
|
container_name: "simple-service"
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
2020-03-13 21:50:05 +00:00
|
|
|
- "traefik.http.routers.whoami.rule=Host(`whoami.example.com`)"
|
2019-08-06 15:46:04 +00:00
|
|
|
- "traefik.http.routers.whoami.entrypoints=websecure"
|
2020-02-17 10:04:04 +00:00
|
|
|
- "traefik.http.routers.whoami.tls.certresolver=myresolver"
|