-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
211 lines (193 loc) · 4.22 KB
/
docker-compose.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
# 김승진 작성
version: "3.9"
services:
frontend:
build:
context: ./frontend
container_name: frontend
volumes:
- build_frontend:/frontend/build
- ./frontend/:/frontend/
- ./frontend/node_modules/:/frontend/node_modules
image: run
restart: on-failure
ports:
- 3030:3030
environment:
- WDS_SOCKET_PORT=0
stdin_open: true
tty: true
nginx:
build: ./nginx
ports:
- 80:80
volumes:
- build_frontend:/var/www/frontend
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
container_name: nginx
restart: on-failure
depends_on:
- frontend
- api-gateway
networks:
- app-tier
tty: true
zipkin:
container_name: zipkin
image: openzipkin/zipkin
restart: on-failure
ports:
- 9411:9411
networks:
- app-tier
tty: true
discovery:
build:
context: ./discovery-service
command: gradle bootRun
restart: on-failure
container_name: discovery
ports:
- 8761:8761
networks:
- app-tier
tty: true
config:
build:
context: ./config-service
command: ./wait-for-it.sh -t 15 db:3306 -- gradle bootRun
restart: on-failure
container_name: config
ports:
- 8888:8888
networks:
- app-tier
depends_on:
- discovery
tty: true
api-gateway:
build:
context: ./apigateway-service
command: ./wait-for-it.sh -t 5 config:8888 -- gradle bootRun
restart: on-failure
container_name: api-gateway
ports:
- 8000:8000
networks:
- app-tier
depends_on:
- discovery
- config
tty: true
guest:
build:
context: ./guest-service
command: ./wait-for-it.sh -t 10 api-gateway:8000 -- gradle bootRun
restart: on-failure
container_name: guest
networks:
- app-tier
depends_on:
- discovery
- config
- db
tty: true
member:
build:
context: ./member-service
command: ./wait-for-it.sh -t 10 api-gateway:8000 -- gradle bootRun
restart: on-failure
container_name: member
networks:
- app-tier
depends_on:
- discovery
- config
- db
tty: true
problem:
build:
context: ./problem-service
command: ./wait-for-it.sh -t 10 api-gateway:8000 -- gradle bootRun
restart: on-failure
container_name: problem
networks:
- app-tier
depends_on:
- discovery
- config
- db
tty: true
db:
image: mysql
container_name: db
restart: on-failure
ports:
- 3307:3306
volumes:
- data_mysql:/var/lib/mysql
env_file:
- .env
networks:
- app-tier
tty: true
prometheus:
image: prom/prometheus
container_name: prometheus
restart: on-failure
ports:
- 9090:9090
networks:
- app-tier
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./alert_rules.yml:/etc/prometheus/alert_rules.yml
grafana:
image: grafana/grafana
container_name: grafana
restart: on-failure
ports:
- 3000:3000
networks:
- app-tier
alertmanager:
image: prom/alertmanager
container_name: alertmanager
restart: on-failure
user: root
ports:
- 9093:9093
volumes:
- ./alertmanager.yml:/etc/alertmanager/alertmanager.yml
networks:
- app-tier
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
ports:
- 2181:2181
networks:
- app-tier
kafka:
image: wurstmeister/kafka
ports:
- 9092:9092
container_name: kafka
restart: on-failure
environment:
- KAFKA_ADVERTISED_HOST_NAME=kafka
- KAFKA_ADVERTISED_PORT=9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CREATE_TOPICS=dresses:1:1,ratings:1:1
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
depends_on:
- zookeeper
networks:
- app-tier
networks:
app-tier:
driver: bridge
volumes:
data_mysql: null
build_frontend: null