-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
243 lines (227 loc) · 7.31 KB
/
docker-compose-dev.yml
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
version: "3.7"
services:
zookeeper:
image: wurstmeister/zookeeper
platform: linux/amd64
container_name: zookeeper
ports:
- "2181:2181"
networks:
my-network:
ipv4_address: 172.18.0.100
kafka:
container_name: kafka
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 172.18.0.101
KAFKA_CREATE_TOPICS: "test:1:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
networks:
my-network:
ipv4_address: 172.18.0.101
zipkin:
container_name: zipkin
image: openzipkin/zipkin
environment:
JAVA_OPTS: "-Xms1g -Xmx1g -XX:+ExitOnOutOfMemoryError"
ports:
- "9411:9411"
networks:
my-network:
prometheus:
container_name: prometheus
image: prom/prometheus
ports:
- "9090:9090"
volumes:
- /Users/suhanlee/Desktop/msa-project/prometheus-2.45.2.darwin-amd64/prometheus.yml:/etc/prometheus/prometheus.yml
networks:
my-network:
grafana:
container_name: grafana
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- /Users/suhanlee/Desktop/msa-project/grafana-v10.2.3/data:/var/lib/grafana
networks:
my-network:
naming-server:
container_name: naming-server
image: completed0728/naming-server:1.0
ports:
- "8761:8761"
environment:
spring.config.import: optional:configserver:http://config-server:8888
spring.profiles.active: dev
networks:
my-network:
rabbitmq:
container_name: rabbitmq
image: rabbitmq:management
ports:
- "5672:5672" # rabbitmq amqp port
- "15672:15672" # ui manage port
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=admin123
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
networks:
my-network:
mysql:
image: mysql:8.0.33
platform: linux/amd64
restart: always
command:
- --lower_case_table_names=1
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
container_name: mysql
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=msa
- MYSQL_ROOT_PASSWORD=root1234!!
- TZ=Asia/Seoul
volumes:
- /Users/suhanlee/Desktop/msa-project/mysql/database:/var/lib/mysql
networks:
my-network:
config-server:
container_name: config-server
image: completed0728/config-server:1.0
ports:
- "8888:8888"
environment:
spring.rabbitmq.host: rabbitmq
spring.profiles.active: dev
# spring.profiles.active: prod
# spring.profiles.active: default # only local use
depends_on:
- rabbitmq
- mysql
volumes:
- /Users/suhanlee/Desktop/msa-project/rsakey/client.jks:/client.jks
networks:
my-network:
gateway-service:
container_name: gateway-service
image: completed0728/gateway-service:1.0
ports:
- "8000:8000"
environment:
spring.rabbitmq.host: rabbitmq
spring.config.import: optional:configserver:http://config-server:8888
eureka.client.serviceUrl.defaultZone: http://naming-server:8761/eureka
spring.profiles.active: dev
depends_on:
rabbitmq:
condition: service_healthy
networks:
my-network:
ipv4_address: 172.18.0.50
user-service:
container_name: user-service
image: completed0728/user-service:1.0
environment:
spring.rabbitmq.host: rabbitmq
spring.config.import: optional:configserver:http://config-server:8888
management.zipkin.tracing.endpoint: http://zipkin:9411/api/v2/spans
eureka.client.serviceUrl.defaultZone: http://naming-server:8761/eureka
spring.datasource.url: jdbc:mysql://mysql:3306/users?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true
spring.profiles.active: dev
logging.file: /api-logs/users-ws.log
depends_on:
- gateway-service
networks:
my-network:
order-service:
container_name: order-service
image: completed0728/order-service:1.0
environment:
spring.rabbitmq.host: rabbitmq
spring.config.import: optional:configserver:http://config-server:8888
management.zipkin.tracing.endpoint: http://zipkin:9411/api/v2/spans
eureka.client.serviceUrl.defaultZone: http://naming-server:8761/eureka
spring.datasource.url: jdbc:mysql://mysql:3306/orders?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true
spring.profiles.active: dev
logging.file: /api-logs/order-ws.log
depends_on:
- gateway-service
networks:
my-network:
product-service:
container_name: product-service
image: completed0728/product-service:1.0
environment:
spring.rabbitmq.host: rabbitmq
spring.config.import: optional:configserver:http://config-server:8888
management.zipkin.tracing.endpoint: http://zipkin:9411/api/v2/spans
eureka.client.serviceUrl.defaultZone: http://naming-server:8761/eureka
spring.datasource.url: jdbc:mysql://mysql:3306/products?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true
spring.profiles.active: dev
logging.file: /api-logs/product-ws.log
depends_on:
- gateway-service
networks:
my-network:
review-service:
container_name: review-service
image: completed0728/review-service:1.0
environment:
spring.rabbitmq.host: rabbitmq
spring.config.import: optional:configserver:http://config-server:8888
management.zipkin.tracing.endpoint: http://zipkin:9411/api/v2/spans
eureka.client.serviceUrl.defaultZone: http://naming-server:8761/eureka
spring.datasource.url: jdbc:mysql://mysql:3306/reviews?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true
spring.profiles.active: dev
logging.file: /api-logs/review-ws.log
depends_on:
- gateway-service
networks:
my-network:
seller-service:
container_name: seller-service
image: completed0728/seller-service:1.0
environment:
spring.rabbitmq.host: rabbitmq
spring.config.import: optional:configserver:http://config-server:8888
management.zipkin.tracing.endpoint: http://zipkin:9411/api/v2/spans
eureka.client.serviceUrl.defaultZone: http://naming-server:8761/eureka
spring.datasource.url: jdbc:mysql://mysql:3306/managers?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true
spring.profiles.active: dev
logging.file: /api-logs/seller-ws.log
depends_on:
- gateway-service
networks:
my-network:
supervisor-service:
container_name: supervisor-service
image: completed0728/supervisor-service:1.0
environment:
spring.rabbitmq.host: rabbitmq
spring.config.import: optional:configserver:http://config-server:8888
management.zipkin.tracing.endpoint: http://zipkin:9411/api/v2/spans
eureka.client.serviceUrl.defaultZone: http://naming-server:8761/eureka
spring.datasource.url: jdbc:mysql://mysql:3306/managers?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true
spring.profiles.active: dev
logging.file: /api-logs/supervisor-ws.log
depends_on:
- gateway-service
networks:
my-network:
networks:
my-network:
external: true
name: benefits-network