-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·70 lines (67 loc) · 1.67 KB
/
docker-compose.yml
File metadata and controls
executable file
·70 lines (67 loc) · 1.67 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
66
67
68
69
70
version: '3.8'
services:
# 您原有的 Nginx 反向代理服务
nginx-proxy:
image: nginx:latest
container_name: nginx-cdn-proxy
hostname: nginx-proxy
ports:
- "70:80"
- "71:443"
- "72:81"
- "73:444"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
- ./nginx/server:/etc/nginx/server:ro
- ./nginx/logs:/var/log/nginx:rw # 必须挂载日志目录,供NginxPulse读取
environment:
TZ: Asia/Shanghai
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
networks:
- 1panel-network
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 30s
timeout: 10s
retries: 3
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# NginxPulse 日志分析与监控面板
nginx-pulse:
image: magiccoders/nginxpulse:latest
container_name: nginx-pulse
hostname: nginx-pulse
ports:
- "126:8088" # 主Web面板
deploy:
resources:
limits:
cpus: 0.2
memory: 128MB
environment:
TZ: Asia/Shanghai
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ./nginx/logs:/share/logs:ro
- ./nginx-pulse/nginxpulse_data:/app/var/nginxpulse_data:rw
- ./nginx-pulse/configs:/app/configs:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
restart: unless-stopped
depends_on:
- nginx-proxy
networks:
- 1panel-network
networks:
1panel-network:
name: 1panel-network
external: true