-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
177 lines (166 loc) · 3.7 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
services:
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 20s
retries: 3
volumes:
- ~/rabbitmq/helpdesk/data:/var/lib/rabbitmq/
- ~/rabbitmq/helpdesk/logs:/var/log/rabbitmq
networks:
- helpdesk
service-discovery:
container_name: service-discovery
build:
context: ./service-discovery
dockerfile: Dockerfile
env_file:
- ./service-discovery/.env
ports:
- "8761:8761"
expose:
- "8761"
healthcheck:
test: [ "CMD", "curl", "-f", "http://service-discovery:8761/actuator/health" ]
interval: 10s
timeout: 5s
retries: 3
networks:
- helpdesk
config-server:
container_name: config-server
build:
context: ./config-server
dockerfile: Dockerfile
env_file:
- ./config-server/.env
healthcheck:
test: [ "CMD", "curl", "-f", "http://config-server:8888/actuator/health" ]
interval: 10s
timeout: 5s
retries: 3
depends_on:
service-discovery:
condition: service_healthy
networks:
- helpdesk
api-gateway:
container_name: api-gateway
build:
context: ./api-gateway
dockerfile: Dockerfile
env_file:
- ./api-gateway/.env
ports:
- "8765:8765"
expose:
- "8765"
depends_on:
service-discovery:
condition: service_healthy
config-server:
condition: service_healthy
networks:
- helpdesk
auth-service-api:
container_name: auth-service-api
build:
context: ./auth-service-api
dockerfile: Dockerfile
env_file:
- ./auth-service-api/.env
depends_on:
service-discovery:
condition: service_healthy
config-server:
condition: service_healthy
networks:
- helpdesk
email-service:
container_name: email-service
build:
context: ./email-service
dockerfile: Dockerfile
env_file:
- ./email-service/.env
depends_on:
service-discovery:
condition: service_healthy
config-server:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- helpdesk
user-service-api:
container_name: user-service-api
build:
context: ./user-service-api
dockerfile: Dockerfile
env_file:
- ./user-service-api/.env
depends_on:
service-discovery:
condition: service_healthy
config-server:
condition: service_healthy
networks:
- helpdesk
order-service-api:
container_name: order-service-api
build:
context: ./order-service-api
dockerfile: Dockerfile
env_file:
- ./order-service-api/.env
depends_on:
service-discovery:
condition: service_healthy
config-server:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- helpdesk
redis:
container_name: redis
image: redis:latest
healthcheck:
test: redis-cli ping
ports:
- "6379:6379"
expose:
- "6379"
volumes:
- redis_data:/data
networks:
- helpdesk
helpdesk-bff:
container_name: helpdesk-bff
build:
context: ./helpdesk-bff
dockerfile: Dockerfile
env_file:
- ./helpdesk-bff/.env
depends_on:
config-server:
condition: service_healthy
service-discovery:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "8080:8080"
expose:
- "8080"
networks:
- helpdesk
networks:
helpdesk:
driver: bridge
volumes:
redis_data:
driver: local