-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (60 loc) · 1.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (60 loc) · 1.64 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
services:
monolith-db:
image: postgres:16-alpine
environment:
POSTGRES_DB: monolith
POSTGRES_USER: monolith
POSTGRES_PASSWORD: monolith
healthcheck:
test: ["CMD-SHELL", "pg_isready -U monolith"]
interval: 5s
timeout: 3s
retries: 10
reservation-db:
image: postgres:16-alpine
environment:
POSTGRES_DB: reservation
POSTGRES_USER: reservation
POSTGRES_PASSWORD: reservation
healthcheck:
test: ["CMD-SHELL", "pg_isready -U reservation"]
interval: 5s
timeout: 3s
retries: 10
monolith:
build: ./monolith
environment:
MONOLITH_DB_URL: jdbc:postgresql://monolith-db:5432/monolith
MONOLITH_DB_USER: monolith
MONOLITH_DB_PASSWORD: monolith
MONOLITH_PORT: 8081
depends_on:
monolith-db:
condition: service_healthy
ports:
- "8081:8081"
reservation-service:
build: ./reservation-service
environment:
RESERVATION_DB_URL: jdbc:postgresql://reservation-db:5432/reservation
RESERVATION_DB_USER: reservation
RESERVATION_DB_PASSWORD: reservation
RESERVATION_PORT: 8082
depends_on:
reservation-db:
condition: service_healthy
ports:
- "8082:8082"
gateway:
build: ./gateway
environment:
GATEWAY_PORT: 8080
MONOLITH_URI: http://monolith:8081
RESERVATION_SERVICE_URI: http://reservation-service:8082
# Flip to SERVICE to cut the reservations capability over to the extracted service.
RESERVATIONS_TARGET: ${RESERVATIONS_TARGET:-MONOLITH}
depends_on:
- monolith
- reservation-service
ports:
- "8080:8080"