-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
38 lines (35 loc) · 1.1 KB
/
docker-compose.yaml
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
services:
reverse_proxy:
image: traefik:${TRAEFIK_VERSION:-latest}
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
# traefik static configuration
- ./traefik.yaml:/etc/traefik/traefik.yaml:ro
# custom folder with dynamic configuration
- ./custom:/etc/traefik/custom:ro
- certs:/etc/ssl/traefik
networks:
- web
labels:
- traefik.enable=true
- traefik.http.routers.api.rule=Host(`dashboard.traefik.me`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
- traefik.http.routers.api.service=api@internal
- traefik.http.routers.api.entrypoints=web,websecure
- traefik.http.routers.api.tls=true
reverse-proxy-https-helper:
image: alpine
command: sh -c "cd /etc/ssl/traefik
&& wget traefik.me/cert.pem -O cert.pem
&& wget traefik.me/privkey.pem -O privkey.pem"
volumes:
- certs:/etc/ssl/traefik
volumes:
certs:
networks:
web:
name: ${TRAEFIK_NET:-traefik_web}