forked from arvida42/davio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-traefik.yml
45 lines (40 loc) · 1.33 KB
/
docker-compose-traefik.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: "3.3"
services:
davio:
labels:
- "traefik.enable=true"
- "traefik.docker.network=davio_traefik"
- "traefik.http.routers.davio.entrypoints=web,websecure"
- "traefik.http.routers.davio.rule=Host(`${ACME_DOMAIN:-}`)"
- "traefik.http.routers.davio.tls=true"
- "traefik.http.routers.davio.tls.certresolver=letsencryptresolver"
networks:
- traefik
traefik:
image: "traefik:v2.10"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.letsencryptresolver.acme.httpchallenge=true"
- "--certificatesresolvers.letsencryptresolver.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.letsencryptresolver.acme.email=${ACME_EMAIL:-}"
- "--certificatesresolvers.letsencryptresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
# To persist certificates
- letsencrypt:/letsencrypt
# So that Traefik can listen to the Docker events
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- traefik
networks:
traefik:
volumes:
letsencrypt: