-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (35 loc) · 787 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (35 loc) · 787 Bytes
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
version: "3.9"
services:
api:
build: .
ports:
- "8000:8000"
env_file: .env
environment:
- DB_PATH=/data/p5_learning.db
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@postgres:5432/p5_support
volumes:
- p5_data:/data
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: p5_support
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- pg_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
p5_data:
pg_data: