-
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.27 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.27 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
version: '3.1'
services:
stats-server:
build: ./stats-service/stats-server
container_name: stats_server_container
ports:
- "9090:9090"
depends_on:
- stats-db
restart: on-failure
environment:
- DB_HOST=stats-db
- DB_PORT=5432
- DB_NAME=ewm-stats
- POSTGRES_USER=ewm-stats
- POSTGRES_PASSWORD=ewm-stats
stats-db:
image: postgres:14-alpine
container_name: stats_db_container
volumes:
- /var/lib/postgresql/data/
ports:
- "6541:5432"
environment:
- POSTGRES_DB=ewm-stats
- POSTGRES_USER=ewm-stats
- POSTGRES_PASSWORD=ewm-stats
ewm-service:
build: ./main-service
container_name: main_service_container
ports:
- "8080:8080"
depends_on:
- ewm-db
- stats-server
restart: on-failure
environment:
- DB_HOST=ewm-db
- DB_PORT=5432
- DB_NAME=ewm-main
- POSTGRES_USER=ewm-main
- POSTGRES_PASSWORD=ewm-main
- stats-server.url=http://stats-server:9090
ewm-db:
image: postgres:14-alpine
container_name: ewm_db_container
volumes:
- /var/lib/postgresql/data/
ports:
- "6542:5432"
environment:
- POSTGRES_DB=ewm-main
- POSTGRES_USER=ewm-main
- POSTGRES_PASSWORD=ewm-main