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 (57 loc) · 1.42 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
version: '3.8'
services:
stat-server:
build: stat/stat-server
image: ewm-stat-server
container_name: ewm-stat-server
ports:
- "9090:9090"
depends_on:
- stats-db
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://stats-db:5432/stats
- SPRING_DATASOURCE_USERNAME=user
- SPRING_DATASOURCE_PASSWORD=password
restart: on-failure
stats-db:
image: postgres:14-alpine
container_name: postgres-ewm-stats-db
ports:
- "16543:5432"
environment:
- POSTGRES_DB=stats
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
volumes:
- ewm-stats-db-data:/var/lib/postgresql/data
ewm-service:
build: main-service
image: ewm-main-service
container_name: ewm-main-service
ports:
- "8080:8080"
depends_on:
- ewm-db
- stat-server
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://ewm-db:5432/ewm-db
- SPRING_DATASOURCE_USERNAME=user
- SPRING_DATASOURCE_PASSWORD=password
- STAT_SERVER_URL=http://stat-server:9090
restart: on-failure
ewm-db:
image: postgres:14-alpine
container_name: postgres-ewm-db
ports:
- "6543:5432"
environment:
- POSTGRES_DB=ewm-db
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
volumes:
- ewm-db-data:/var/lib/postgresql/data
volumes:
ewm-stats-db-data:
driver: local
ewm-db-data:
driver: local