-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose-local.yml
More file actions
282 lines (261 loc) · 5.89 KB
/
docker-compose-local.yml
File metadata and controls
282 lines (261 loc) · 5.89 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
version: '3.8'
services:
eureka-server:
container_name: eureka-server
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
build:
context: ./application/eureka
dockerfile: Dockerfile
environment:
SPRING_PROFILES_ACTIVE: local
ports:
- '12001:12001'
restart: no
volumes:
- ./log/eureka:/app/log/eureka
networks:
- service-network
gateway-service:
container_name: gateway-service
deploy:
resources:
limits:
cpus: "1"
memory: "1G"
build:
context: ./application/gateway-service
dockerfile: Dockerfile
environment:
SPRING_PROFILES_ACTIVE: local
ports:
- '12011:12011'
restart: no
volumes:
- ./log/gateway:/app/log/gateway
networks:
- service-network
user-service:
container_name: user-service
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
build:
context: ./application/user-service
dockerfile: Dockerfile
environment:
SPRING_PROFILES_ACTIVE: local
SPRING_REDIS_HOST: redis
ports:
- '12021'
restart: no
depends_on:
- postgres-user
volumes:
- ./log/user:/app/log/user
networks:
- service-network
concert-service:
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
build:
context: ./application/concert-service
dockerfile: Dockerfile
environment:
SPRING_PROFILES_ACTIVE: local
SPRING_REDIS_HOST: redis
ports:
- '12031'
restart: no
depends_on:
- postgres-concert
volumes:
- ./log/concert:/app/log/concert
networks:
- service-network
order-service:
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
build:
context: ./application/order-service
dockerfile: Dockerfile
environment:
SPRING_PROFILES_ACTIVE: local
SPRING_REDIS_HOST: redis
ports:
- '12041'
restart: no
depends_on:
- postgres-order
volumes:
- ./log/order:/app/log/order
networks:
- service-network
postgres-user:
image: 'postgres:16.4'
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
environment:
- 'POSTGRES_DB=fortickets'
- 'POSTGRES_PASSWORD=1234'
- 'POSTGRES_USER=forman'
ports:
- '54322:5432'
volumes:
- ../db/user-service:/var/lib/postgresql/data
networks:
- service-network
postgres-concert:
image: 'postgres:16.4'
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
environment:
- 'POSTGRES_DB=fortickets'
- 'POSTGRES_PASSWORD=1234'
- 'POSTGRES_USER=forman'
ports:
- '54323:5432'
volumes:
- ../db/concert-service:/var/lib/postgresql/data
networks:
- service-network
postgres-order:
image: 'postgres:16.4'
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
environment:
- 'POSTGRES_DB=fortickets'
- 'POSTGRES_PASSWORD=1234'
- 'POSTGRES_USER=forman'
ports:
- '54324:5432'
volumes:
- ../db/order-service:/var/lib/postgresql/data
networks:
- service-network
zipkin:
image: openzipkin/zipkin
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
ports:
- "9411:9411" # Zipkin UI에 접근할 포트
networks:
- service-network
zookeeper:
image: zookeeper:latest
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- service-network
kafka:
image: wurstmeister/kafka:latest
platform: linux/amd64
deploy:
resources:
limits:
cpus: "1"
memory: "1G"
ports:
- "29092:29092"
environment:
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:29092,OUTSIDE://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_LISTENERS: INSIDE://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
networks:
- service-network
kafka-ui:
image: provectuslabs/kafka-ui:latest
platform: linux/amd64
ports:
- "8080:8080"
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181
KAFKA_CLUSTERS_0_READONLY: "false"
networks:
- service-network
redis:
image: redis:latest
container_name: redis
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
environment:
SPRING_REDIS_HOST: redis
ports:
- "6379:6379"
volumes:
- ./redis_data:/data
networks:
- service-network
prometheus:
image: prom/prometheus
container_name: prometheus
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
ports:
- "9090:9090"
volumes:
- ./docker-config/prometheus.yml:/etc/prometheus/prometheus.yml # 상대 경로 수정
command:
- '--config.file=/etc/prometheus/prometheus.yml'
networks:
- service-network
grafana:
image: grafana/grafana
container_name: grafana
volumes:
- ./grafana-data:/var/lib/grafana # 영구 저장을 위한 볼륨 매핑
- ./grafana/provisioning:/etc/grafana/provisioning # 프로비저닝 설정 (추가)
deploy:
resources:
limits:
cpus: "0.5"
memory: "500m"
ports:
- "3000:3000"
depends_on:
- prometheus
networks:
- service-network
networks:
service-network: