-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (40 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
41 lines (40 loc) · 1.11 KB
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
services:
sing-box:
image: ghcr.io/sagernet/sing-box:latest
container_name: sing-box
hostname: sing-box
restart: unless-stopped
tty: true
command: run -c /etc/sing-box/config.json
ports:
# 443 端口用于代理流量(VLESS 和 Hysteria2 同端口多路)
- "443:443/tcp"
- "443:443/udp"
volumes:
- ${SING_BOX_DATA_DIR}/config.json:/etc/sing-box/config.json
- ${SING_BOX_DATA_DIR}/cert:/etc/sing-box/cert
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
sub:
build:
context: ./sing-box/sub
dockerfile: Dockerfile
container_name: sub
restart: unless-stopped
ports:
# 订阅服务端口(仅供拉取订阅使用,非代理流量)
- "8080:8080/tcp"
volumes:
- ${SING_BOX_DATA_DIR}/users.json:/etc/sing-box/users.json:ro
environment:
- REALITY_PUBLIC_KEY=${REALITY_PUBLIC_KEY}
- REALITY_SHORT_ID=${REALITY_SHORT_ID}
- REALITY_DEST=${REALITY_DEST}
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "1"