-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (54 loc) · 1.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (54 loc) · 1.38 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '3.8'
services:
light-browser:
build: .
image: light-browser:latest
container_name: light-browser
restart: unless-stopped
ports:
- "9222:9222" # CDP 端口
- "6080:6080" # noVNC 端口
- "18888:18888" # Web 管理端口
environment:
# Camoufox 配置
- CAMOUFOX_PORT=9222
- CAMOUFOX_WS_PATH=
# noVNC 配置
- NOVNC_PORT=6080
- DISPLAY=:99
# Web 管理配置
- WEB_MANAGER_PORT=18888
# 监控配置
- MONITOR_INTERVAL=30
- MAX_RESTART_COUNT=5
- RESTART_WINDOW=300
# 飞书机器人配置(请根据实际情况配置)
- FEISHU_WEBHOOK=${FEISHU_WEBHOOK:-}
- FEISHU_SECRET=${FEISHU_SECRET:-}
volumes:
# 日志持久化
- ./logs:/app/logs
# 共享内存,浏览器需要
shm_size: '1gb'
# 安全配置
security_opt:
- seccomp:unconfined
# 资源限制
deploy:
resources:
limits:
memory: 2G
cpus: '1.0'
reservations:
memory: 512M
cpus: '0.5'
# 健康检查
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9222/json/version", "||", "exit", "1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
default:
name: light-browser-network