-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (78 loc) · 1.8 KB
/
docker-compose.yml
File metadata and controls
81 lines (78 loc) · 1.8 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
# docker-compose.yml - 1분 이내 배포 최적화
# 🚀 ULTRA FAST VERSION
services:
users-app:
build:
context: .
dockerfile: apps/Dockerfile
args:
- YARN_WORKSPACE=apps
image: ${ECR_REGISTRY}/users-app:latest
container_name: apps
ports:
- '3000:3000'
env_file:
- .env
environment:
- NODE_ENV=production
# 🚀 메모리 최적화
- NODE_OPTIONS=--max-old-space-size=2048
networks:
- shared-net
restart: unless-stopped
# 🚀 고속 헬스체크 (간격 단축)
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 15s
timeout: 5s
retries: 2
start_period: 20s
# 🚀 로그 최적화 (크기 제한)
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
# 🚀 리소스 제한 (ARM64 최적화)
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
admin-app:
build:
context: .
dockerfile: admin/Dockerfile
image: ${ECR_REGISTRY}/admin-app:latest
container_name: admin
ports:
- '3001:3001'
environment:
- NODE_ENV=production
networks:
- shared-net
restart: unless-stopped
# 🚀 고속 헬스체크 (React는 더 빠름)
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001"]
interval: 10s
timeout: 3s
retries: 2
start_period: 10s
# 🚀 로그 최적화
logging:
driver: "json-file"
options:
max-size: "3m"
max-file: "2"
# 🚀 리소스 제한 (정적 파일 서빙)
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
networks:
shared-net:
external: true