-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
37 lines (34 loc) · 1.01 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
version: "3.7"
networks:
web-network:
services:
reverse-proxy:
image: traefik:v3.0
restart: unless-stopped
command:
- "--configFile=/etc/traefik/traefik.yml" # 使用静态配置文件
- "/bin/sh"
- "-c"
- "chmod 600 /acme.json && /entrypoint.sh"
ports:
- "80:80"
- "443:443"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yml:/etc/traefik/traefik.yml
- ./dynamic.yml:/etc/traefik/dynamic.yml
- ./data/acme.json:/acme.json
- ./data/backup:/backup
networks:
- web-network
avahi-helper:
# 这个容器会将以 .local 结尾的 Host 广播出去
# 在同一个同一个局域网的用户就都能访问到了
image: hardillb/traefik-avahi-helper:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket
networks:
- web-network