-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (57 loc) · 2.11 KB
/
docker-compose.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
services:
traefik:
image: traefik:v3.3.3
deploy:
update_config:
parallelism: 2
restart_policy:
condition: any
delay: 30s
max_attempts: 60
mode: replicated
replicas: 1
endpoint_mode: dnsrr
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.http.routers.traefik-public.rule=Host(`test-traefik.twir.app`)
- traefik.http.routers.traefik-public.service=api@internal
# - traefik.http.routers.traefik-public.middlewares=admin-auth
- traefik.http.services.traefik-public.loadbalancer.server.port=8080
volumes:
# Add Docker as a mounted volume, so that Traefik can read the labels of other services
- /var/run/docker.sock:/var/run/docker.sock:ro
# Mount the volume to store the certificates
- traefik-public-certificates:/certificates
command:
- --providers.docker
- --providers.docker.exposedbydefault=false
- --providers.swarm
- --providers.swarm.endpoint=unix:///var/run/docker.sock
- --providers.swarm.exposedByDefault=false
- --providers.swarm.refreshSeconds=5
- --entrypoints.http.address=:80
# - --entrypoints.web.http.redirections.entrypoint.to=https
# - --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.https.address=:443
- --certificatesresolvers.le.acme.storage=/certificates/acme.json
- --certificatesresolvers.le.acme.tlschallenge=true
- --accesslog
- --log
- --api
- --tracing=true
# - --experimental.plugins.staticresponse.modulename=github.com/jdel/staticresponse
# - --experimental.plugins.staticresponse.version=v0.0.1
networks:
- traefik-public
- cloudflared
volumes:
traefik-public-certificates:
networks:
traefik-public:
external: true
cloudflared:
external: true