-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
191 lines (185 loc) · 4.53 KB
/
docker-compose-dev.yml
File metadata and controls
191 lines (185 loc) · 4.53 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
services:
server:
container_name: troublog
image: zksdbstjq/troublog:latest
build: .
ports:
- "8080:8080"
env_file:
- .env
environment:
- SPRING_PROFILES_ACTIVE=dev
- SPRING_FLYWAY_ENABLED=false
- AI_PROMPT_SYSTEM=file:/app/prompts/system.st
- AI_PROMPT_RESUME=file:/app/prompts/resume.st
- AI_PROMPT_INTERVIEW=file:/app/prompts/interview.st
- AI_PROMPT_MEMOIRS=file:/app/prompts/memoirs.st
- AI_PROMPT_ISSUE_MANAGEMENT=file:/app/prompts/issue-management.st
volumes:
- ${LOG_DIR:-./logs}:/app/logs
- ./prompts:/app/prompts
networks:
- app-network
- monitoring
depends_on:
redis:
condition: service_healthy
deploy:
resources:
limits:
cpus: '0.8'
memory: 384M
reservations:
cpus: '0.3'
memory: 256M
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
compress: "true"
restart: unless-stopped
redis:
image: redis:8.2.2-alpine
container_name: redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf --maxmemory 64mb --maxmemory-policy allkeys-lru
networks:
- app-network
- monitoring
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '0.3'
memory: 80M
reservations:
cpus: '0.1'
memory: 64M
logging:
driver: "json-file"
options:
max-size: "3m"
max-file: "2"
compress: "true"
nginx:
container_name: nginx
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx-dev.conf:/etc/nginx/nginx.conf:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
- ./certbot/www:/var/www/certbot:ro
depends_on:
- server
- grafana
networks:
- app-network
- monitoring
deploy:
resources:
limits:
cpus: '0.2'
memory: 64M
reservations:
cpus: '0.05'
memory: 32M
logging:
driver: "json-file"
options:
max-size: "3m"
max-file: "2"
compress: "true"
restart: unless-stopped
# Prometheus - 메트릭 수집
prometheus:
image: prom/prometheus:v2.45.0
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus/prometheus-dev.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=3d'
- '--storage.tsdb.retention.size=200MB'
- '--web.enable-lifecycle'
- '--query.max-samples=10000'
restart: unless-stopped
networks:
- monitoring
deploy:
resources:
limits:
cpus: '0.3'
memory: 200M
reservations:
cpus: '0.1'
memory: 128M
logging:
driver: "json-file"
options:
max-size: "3m"
max-file: "2"
compress: "true"
# Grafana - 시각화
grafana:
image: grafana/grafana:10.0.0
container_name: grafana
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning
- ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards
env_file:
- .env
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
- GF_USERS_ALLOW_SIGN_UP=${GRAFANA_ALLOW_SIGNUP}
- GF_SERVER_ROOT_URL=${GRAFANA_ROOT_URL}
- GF_SERVER_SERVE_FROM_SUB_PATH=${GRAFANA_SERVE_FROM_SUB_PATH}
- GF_ANALYTICS_REPORTING_ENABLED=false
- GF_ANALYTICS_CHECK_FOR_UPDATES=false
- GF_ALERTING_ENABLED=false
restart: unless-stopped
networks:
- monitoring
deploy:
resources:
limits:
cpus: '0.3'
memory: 150M
reservations:
cpus: '0.1'
memory: 100M
logging:
driver: "json-file"
options:
max-size: "3m"
max-file: "2"
compress: "true"
networks:
app-network:
driver: bridge
monitoring:
driver: bridge
volumes:
prometheus_data:
grafana_data:
redis_data: