-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (86 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
96 lines (86 loc) · 2.2 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
services:
# =========================
# VEHICLE SERVICE
# =========================
vehicle-db:
image: postgres:16
container_name: vehicle-db
environment:
POSTGRES_DB: vehicle_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- vehicle-db-data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d vehicle_db" ]
interval: 5s
timeout: 5s
retries: 10
vehicle-service:
build: ./services/vehicle-service
container_name: vehicle-service
ports:
- "8081:8080"
environment:
DB_URL: jdbc:postgresql://vehicle-db:5432/vehicle_db
DB_USERNAME: postgres
DB_PASSWORD: postgres
depends_on:
vehicle-db:
condition: service_healthy
# =========================
# APPOINTMENT SERVICE
# =========================
appointment-db:
image: postgres:16
container_name: appointment-db
environment:
POSTGRES_DB: appointment_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5434:5432"
volumes:
- appointment-db-data:/var/lib/postgresql/data
appointment-service:
build: ./services/appointment-service
container_name: appointment-service
ports:
- "8082:8080"
environment:
DB_URL: jdbc:postgresql://appointment-db:5432/appointment_db
DB_USERNAME: postgres
DB_PASSWORD: postgres
depends_on:
- appointment-db
# =========================
# IDENTITY SERVICE
# =========================
identity-db:
image: postgres:16
container_name: identity-db
environment:
POSTGRES_DB: identity_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5435:5432"
volumes:
- identity-db-data:/var/lib/postgresql/data
identity-service:
build: ./services/identity-service
container_name: identity-service
ports:
- "8083:8080"
environment:
DB_URL: jdbc:postgresql://identity-db:5432/identity_db
DB_USERNAME: postgres
DB_PASSWORD: postgres
depends_on:
- identity-db
volumes:
vehicle-db-data:
appointment-db-data:
identity-db-data: