-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-global.yaml
63 lines (58 loc) · 1.33 KB
/
docker-compose-global.yaml
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
62
63
services:
api:
build: InNoHassle-Rooms
expose:
- 80
depends_on:
migration:
condition: service_completed_successfully
env_file: InNoHassle-Rooms/.env
environment:
DB_NAME: innohassle_rooms_api
DB_HOST: db:5432
DB_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
bot:
build: InNoHassle-RoomsBot
depends_on:
- api
env_file: InNoHassle-RoomsBot/.env
environment:
- API_URL=http://api:80
db:
image: postgres
volumes:
- db_data:/var/lib/postgresql/data
expose:
- 5432
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"]
start_period: 5s
interval: 5s
timeout: 2s
retries: 3
environment:
- POSTGRES_DB=innohassle_rooms_api
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
secrets:
- db_password
migration:
build: InNoHassle-Rooms
command: alembic upgrade head
depends_on:
db:
condition: service_healthy
env_file: InNoHassle-Rooms/.env
environment:
DB_NAME: innohassle_rooms_api
DB_HOST: db:5432
DB_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
secrets:
db_password:
file: db_password.txt
volumes:
db_data: