forked from skypro-008/lessons-25_26
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
39 lines (38 loc) · 867 Bytes
/
docker-compose.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
version: "3.9"
services:
api:
build:
context: .
image: vitaliimadiakin/skypro_dz26
ports:
- 80:80
volumes:
- ./docker_config.py:/code/default_config.py
depends_on:
pg:
condition: service_healthy
migrations:
condition: service_completed_successfully
migrations:
build:
context: .
image: vitaliimadiakin/skypro_dz26
volumes:
- ./docker_config.py:/code/default_config.py
depends_on:
pg:
condition: service_healthy
command: flask db upgrade
pg:
image: postgres:latest
environment:
POSTGRES_USER: anya
POSTGRES_PASSWORD: anya
POSTGRES_DB: anyabase
volumes:
- ./pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5