forked from uu-code007/PixelFreeEffects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
72 lines (67 loc) · 1.6 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
72 lines (67 loc) · 1.6 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
71
72
version: '3.8'
services:
smbeauty-api:
build: .
container_name: smbeauty-license-api
restart: unless-stopped
ports:
- "80:80" # HTTP 重定向端口
- "443:443" # HTTPS 端口
environment:
- ENABLE_HTTPS=true
- SSL_CERT_PATH=/app/certs/cert.pem
- SSL_KEY_PATH=/app/certs/key.pem
- HTTP_PORT=80
- HTTPS_PORT=443
- DOWNLOAD_BASE_URL=https://api.example.com # 请替换为你的域名
- LOG_LEVEL=info
- LICENSE_VALIDITY_DAYS=365
volumes:
- ./data:/app/data
- ./licenses:/app/licenses
- ./certs:/app/certs
- ./logs:/app/logs
networks:
- smbeauty-network
healthcheck:
test: ["CMD", "curl", "-f", "https://localhost:443/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# 可选:Nginx 反向代理
nginx:
image: nginx:alpine
container_name: smbeauty-nginx
restart: unless-stopped
ports:
- "8080:80" # 外部访问端口
- "8443:443" # 外部 HTTPS 端口
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs:/etc/nginx/certs:ro
depends_on:
- smbeauty-api
networks:
- smbeauty-network
profiles:
- nginx
# 可选:Redis 缓存(如果需要)
redis:
image: redis:alpine
container_name: smbeauty-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- smbeauty-network
profiles:
- cache
networks:
smbeauty-network:
driver: bridge
volumes:
redis-data:
driver: local