generated from yandex-praktikum/java-explore-with-me
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (56 loc) · 1.41 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
services:
stats-server:
build: ./stats/stats-server
image: stats-server
container_name: stats-server
ports:
- "9090:9090"
depends_on:
stats-db:
condition: service_healthy
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://stats-db:5432/stats
- SPRING_DATASOURCE_USERNAME=stats
- SPRING_DATASOURCE_PASSWORD=stats
stats-db:
image: postgres:16.1
container_name: postgres
ports:
- "6432:5432"
environment:
- POSTGRES_DB=stats
- POSTGRES_USER=stats
- POSTGRES_PASSWORD=stats
healthcheck:
test: pg_isready -q -d $$POSTGRES_DB -U $$POSTGRES_USER
timeout: 5s
interval: 5s
retries: 10
ewm-service:
build: ./main-service
image: ewm-service
container_name: ewm-service
ports:
- "8080:8080"
depends_on:
ewm-db:
condition: service_healthy
environment:
- CLIENT_URL=http://stats-server:9090
- SPRING_DATASOURCE_URL=jdbc:postgresql://ewm-db:5432/main
- SPRING_DATASOURCE_USERNAME=main
- SPRING_DATASOURCE_PASSWORD=main
ewm-db:
image: postgres:16.1
container_name: postgres-main
ports:
- "6431:5432"
environment:
- POSTGRES_DB=main
- POSTGRES_USER=main
- POSTGRES_PASSWORD=main
healthcheck:
test: pg_isready -q -d $$POSTGRES_DB -U $$POSTGRES_USER
timeout: 5s
interval: 5s
retries: 10