generated from yandex-praktikum/java-explore-with-me
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (47 loc) · 1.17 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
version: '3.1'
services:
stats-server:
build: ./ewm-statistic/ewm-statistic-service
container_name: ewm-statistic-service
ports:
- "9090:9090"
depends_on:
- stats-db
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://stats-db:5432/statistic
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
stats-db:
image: postgres:14-alpine
volumes:
- /var/lib/postgresql/data/
container_name: ewm-statistic-service-db
ports:
- "6541:5432"
environment:
- POSTGRES_DB=statistic
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
ewm-service:
build: ./ewm-main
container_name: ewm-main-service
ports:
- "8080:8080"
depends_on:
- ewm-db
environment:
- EWM_STATS_URL=http://stats-server:9090
- SPRING_DATASOURCE_URL=jdbc:postgresql://ewm-db:5432/ewm
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
ewm-db:
image: postgres:14-alpine
volumes:
- /var/lib/postgresql/data/
container_name: ewm-main-service-db
ports:
- "6542:5432"
environment:
- POSTGRES_DB=ewm
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root