-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
257 lines (240 loc) · 5.81 KB
/
docker-compose.yml
File metadata and controls
257 lines (240 loc) · 5.81 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
services:
zookeeper:
image: zookeeper:3.7.0
container_name: zookeeper
restart: "no"
networks:
- backend
ports:
- "2181:2181"
kafka:
image: obsidiandynamics/kafka
container_name: kafka
restart: "no"
networks:
- backend
ports:
- "9092:9092"
environment:
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: DOCKER_INTERNAL:PLAINTEXT,DOCKER_EXTERNAL:PLAINTEXT
KAFKA_LISTENERS: DOCKER_INTERNAL://:29092,DOCKER_EXTERNAL://:9092
KAFKA_ADVERTISED_LISTENERS: DOCKER_INTERNAL://kafka:29092,DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER_INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
kafdrop:
image: obsidiandynamics/kafdrop
container_name: kafdrop
restart: "no"
networks:
- backend
ports:
- "9000:9000"
environment:
KAFKA_BROKERCONNECT: "kafka:29092"
depends_on:
- "kafka"
postgres:
image: postgres:16
container_name: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: admin
POSTGRES_DB: OnlineStore
ports:
- "5432:5432"
networks:
- backend
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres_user" ]
interval: 30s
timeout: 10s
retries: 5
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "5433:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
networks:
- backend
depends_on:
- postgres
discovery:
build:
context: ./backend/discovery
container_name: discovery
ports:
- "8761:8761"
networks:
- backend
environment:
SPRING_PROFILES_ACTIVE: dev
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8761/actuator/health"]
interval: 30s
timeout: 10s
retries: 5
gateway:
build:
context: ./backend/gateway
container_name: gateway
ports:
- "8091:8091"
networks:
- backend
environment:
SPRING_PROFILES_ACTIVE: dev
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8091/actuator/health"]
interval: 30s
timeout: 10s
retries: 5
config-server:
build:
context: ./backend/config-server
container_name: config-server
ports:
- "8888:8888"
networks:
- backend
depends_on:
- postgres
environment:
SPRING_PROFILES_ACTIVE: dev, native
DATABASE_URL: 'jdbc:postgresql://postgres:5432/OnlineStore'
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: admin
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8888/actuator/health" ]
interval: 30s
timeout: 10s
retries: 5
authorization:
build:
context: ./backend/authorization
container_name: authorization
restart: on-failure
depends_on:
- discovery
- config-server
ports:
- "8060:8060"
environment:
SPRING_PROFILES_ACTIVE: dev
DATABASE_URL: 'jdbc:postgresql://postgres:5432/OnlineStore'
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: admin
TOKEN-SIGNING-KEY: 53A73E5F1C4E0A2D3B5F2D784E6A1B423D6F247D1F6E5C3A596D635A75327855
networks:
- backend
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8060/actuator/health" ]
interval: 10s
timeout: 5s
retries: 5
basket:
build:
context: ./backend/basket
container_name: basket
restart: on-failure
ports:
- "8050:8050"
networks:
- backend
environment:
SPRING_PROFILES_ACTIVE: dev
DATABASE_URL: 'jdbc:postgresql://postgres:5432/OnlineStore'
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: admin
depends_on:
- discovery
- config-server
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8050/actuator/health" ]
interval: 10s
timeout: 5s
retries: 5
orders:
build:
context: ./backend/orders
container_name: orders
restart: on-failure
ports:
- "8020:8020"
networks:
- backend
environment:
SPRING_PROFILES_ACTIVE: dev
DATABASE_URL: 'jdbc:postgresql://postgres:5432/OnlineStore'
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: admin
depends_on:
- discovery
- config-server
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8020/actuator/health" ]
interval: 10s
timeout: 5s
retries: 5
products:
build:
context: ./backend/products
container_name: products
restart: on-failure
ports:
- "8071:8071"
networks:
- backend
environment:
SPRING_PROFILES_ACTIVE: dev
DATABASE_URL: 'jdbc:postgresql://postgres:5432/OnlineStore'
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: admin
depends_on:
- discovery
- config-server
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8071/actuator/health" ]
interval: 10s
timeout: 5s
retries: 5
telegram-bot:
build:
context: ./telegrambot
container_name: telegram-bot
restart: on-failure
ports:
- "8010:8010"
networks:
backend:
environment:
SPRING_PROFILES_ACTIVE: dev
BOT_TOKEN: 7875396019:AAEA7ACi0FA-9bkyuBiDd8yrnE6XZcKJKqk
BOT_NAME: HukisingBot
networks:
backend:
driver: bridge
volumes:
postgres_data: {}
zookeeper: {}
kafka: {}
kafdrop: {}
postgres: {}
discovery: {}
config-server: {}
gateway: {}
authorization: {}
basket: {}
orders: {}
products: {}
pgadmin_data: {}