-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
68 lines (63 loc) · 1.61 KB
/
docker-compose.yaml
File metadata and controls
68 lines (63 loc) · 1.61 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
version: '3.8'
services:
# 焦散透镜设计工具前端应用
caustic-lens:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: caustic-lens-app
ports:
- "3000:80"
environment:
- NODE_ENV=production
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- caustic-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.caustic-lens.rule=Host(`localhost`)"
- "traefik.http.services.caustic-lens.loadbalancer.server.port=80"
# 可选:Nginx 反向代理(如果需要更复杂的路由)
# nginx-proxy:
# image: nginx:alpine
# container_name: caustic-lens-proxy
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx-proxy.conf:/etc/nginx/nginx.conf:ro
# - ./ssl:/etc/nginx/ssl:ro
# depends_on:
# - caustic-lens
# restart: unless-stopped
# networks:
# - caustic-network
# 可选:Redis 缓存(如果需要缓存功能)
# redis:
# image: redis:7-alpine
# container_name: caustic-lens-redis
# ports:
# - "6379:6379"
# volumes:
# - redis-data:/data
# restart: unless-stopped
# networks:
# - caustic-network
# command: redis-server --appendonly yes
networks:
caustic-network:
driver: bridge
name: caustic-lens-network
# 可选:数据卷(如果需要持久化存储)
# volumes:
# redis-data:
# driver: local
# app-data:
# driver: local