-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.34 KB
/
docker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.34 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
services:
stats-db:
image: postgres:16.1
container_name: stats-db
ports:
- "5432:5432"
environment:
POSTGRES_DB: statsdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
stats-server:
build: ./statistics/server
container_name: stats-server
ports:
- "9090:9090"
depends_on:
stats-db:
condition: service_healthy
environment:
STATS_DB_URL: jdbc:postgresql://stats-db:5432/statsdb
STATS_DB_USER: postgres
STATS_DB_PASSWORD: password
ewm-db:
image: postgres:16.1
container_name: ewm-db
ports:
- "5433:5432"
environment:
POSTGRES_DB: ewmdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
ewm-service:
build: ./ewm-service
container_name: ewm-service
ports:
- "8080:8080"
depends_on:
ewm-db:
condition: service_healthy
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://ewm-db:5432/ewmdb
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: password
STATS_SERVER_URL: http://stats-server:9090