-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
94 lines (90 loc) · 2.17 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
94 lines (90 loc) · 2.17 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
services:
# Blue 환경 (Prod)
app-blue:
image: ${ECR_REGISTRY}/${ECR_REPOSITORY}:${BLUE_TAG:-latest}
container_name: kiero-prod-app-blue
ports:
- "8080:8080"
env_file:
- .env.prod
environment:
- SPRING_PROFILES_ACTIVE=prod
- TZ=Asia/Seoul
- JAVA_OPTS=-Xms1024m -Xmx2048m -XX:+UseG1GC -XX:MaxGCPauseMillis=200
networks:
- app-network
restart: always
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/actuator/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "100m" # Prod는 로그 보관 용량 증설
max-file: "10"
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '1.0' # 안정성을 위해 최소 보장 CPU 할당
memory: 1G
# Green 환경 (Prod)
app-green:
image: ${ECR_REGISTRY}/${ECR_REPOSITORY}:${GREEN_TAG:-latest}
container_name: kiero-prod-app-green
ports:
- "8081:8080"
env_file:
- .env.prod
environment:
- SPRING_PROFILES_ACTIVE=prod
- TZ=Asia/Seoul
- JAVA_OPTS=-Xms1024m -Xmx2048m -XX:+UseG1GC -XX:MaxGCPauseMillis=200
networks:
- app-network
restart: always
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/actuator/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '1.0'
memory: 1G
# Redis
redis:
image: redis:7-alpine
container_name: kiero-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- app-network
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
networks:
app-network:
driver: bridge
volumes:
redis-data: