-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (39 loc) · 1.03 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
version: "3"
services:
postgres:
image: postgres:13
container_name: "pktapi_db"
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PSWD}
volumes:
- "./data:/var/lib/postgresql/data"
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
app:
image: atoivat/pktapi
build:
context: .
dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
environment:
- DB=postgresql
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PSWD=${DB_PSWD}
- DB_HOST=postgres
- DB_PORT=5432
- SECRET_KEY=${SECRET_KEY}
volumes:
- ./core:/core
- ./app:/app
ports:
- "8000:80"