generated from yandex-praktikum/java-explore-with-me
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (58 loc) · 1.31 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
60
61
services:
stats-server:
container_name: stats-server
build: ./stats/stats-server
ports:
- "9090:9090"
depends_on:
stats-db:
condition: service_healthy
environment:
- DB_NAME=stats-db
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=12345
- DB_HOST=stats-db
- DB_PORT=5432
stats-db:
container_name: stats-db
image: postgres:14-alpine
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
environment:
- POSTGRES_DB=stats-db
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=12345
ewm-service:
container_name: ewm-service
build: ./main-service
ports:
- "8080:8080"
depends_on:
ewm-db:
condition: service_healthy
environment:
- DB_NAME=ewm-db
- DB_HOST=ewm-db
- DB_PORT=5432
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=12345
- STATS_SERVER_URL=http://stats-server:9090
ewm-db:
container_name: ewm-db
image: postgres:14-alpine
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
ports:
- "6432:5432"
environment:
- POSTGRES_DB=ewm-db
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=12345