-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
183 lines (167 loc) · 3.42 KB
/
docker-compose.yml
File metadata and controls
183 lines (167 loc) · 3.42 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
version: '3.8'
services:
discovery:
build: ./discovery
container_name: discovery
ports:
- "8761:8761"
networks:
- msa-net
healthcheck:
test: curl --fail http://localhost:8761/eureka || exit 1
interval: 10s
timeout: 5s
retries: 10
api-gateway:
build: ./api-gateway
container_name: api-gateway
ports:
- "8080:8080"
depends_on:
- discovery
networks:
- msa-net
env_file:
- ./api-gateway/.env
user-service:
build: ./user-service
container_name: user-service
ports:
- "8081:8081"
depends_on:
- api-gateway
- mongodb
- kafka
networks:
- msa-net
env_file:
- ./user-service/.env
board-service:
build: ./board-service
container_name: board-service
ports:
- "8082:8082"
depends_on:
- api-gateway
- redis
- mongodb
- user-service
networks:
- msa-net
env_file:
- ./board-service/.env
welfare-service:
build: ./welfare-service
container_name: welfare-service
ports:
- "8083:8083"
depends_on:
- api-gateway
- redis
- mongodb
networks:
- msa-net
env_file:
- ./welfare-service/.env
ai-engine-service:
build: ./ai-engine-service
container_name: ai-engine-service
ports:
- "8084:8084"
depends_on:
- api-gateway
networks:
- msa-net
env_file:
- ./ai-engine-service/.env
monitoring:
build: ./monitoring
container_name: monitoring
ports:
- "8085:8085"
depends_on:
- api-gateway
networks:
- msa-net
env_file:
- ./monitoring/.env
data-collector:
build: ./data-collector
container_name: data-collector
ports:
- "8086:8086"
depends_on:
- api-gateway
- mongodb
- mysql
networks:
- msa-net
env_file:
- ./data-collector/.env
zookeeper:
image: bitnami/zookeeper:latest
container_name: zookeeper
ports:
- "2181:2181"
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
networks:
- msa-net
redis:
image: redis:7-alpine
container_name: redis
ports:
- "6379:6379"
networks:
- msa-net
kafka:
image: wurstmeister/kafka:2.13-2.7.0
container_name: kafka
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
depends_on:
- zookeeper
networks:
- msa-net
mongodb:
image: mongo:latest
container_name: mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
networks:
- msa-net
zipkin:
image: openzipkin/zipkin:2.23
container_name: zipkin
ports:
- "9411:9411"
networks:
- msa-net
mysql:
image: mysql:8.0
container_name: mysql
restart: always
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- mysql-data:/var/lib/mysql
networks:
- msa-net
networks:
msa-net:
volumes:
mysql-data: