-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
29 lines (28 loc) · 1.08 KB
/
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
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.10
# Restart this container unless it was explicitly stopped
restart: "unless-stopped"
# Enables the web UI and tells Traefik to listen to docker
command:
- --global.sendanonymoususage=false
- --api.dashboard=true
- --providers.docker
- --providers.docker.httpClientTimeout=300
- --providers.docker.defaultRule=Host(`{{$$dcs := index .Labels "com.docker.compose.service"}}{{if $$dcs}}{{$$dcs}}.{{ index .Labels "com.docker.compose.project" }}{{else}}{{ normalize .Name }}{{end}}.${DOMAIN:-localhost}`)
ports:
- "${PORT:-80}:80"
volumes:
# So that Traefik can listen to the Docker events
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- traefik
labels:
- traefik.http.routers.dashboard.rule=Host(`traefik.${DOMAIN:-localhost}`)
- traefik.http.routers.dashboard.service=api@internal
- traefik.http.services.traefik.loadbalancer.server.port=80
networks:
traefik:
attachable: true
name: traefik