-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 1.05 KB
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 1.05 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
name: roost
services:
roost-db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
roost-api:
build: .
image: roost
restart: unless-stopped
command: >
sh -c "/app/.venv/bin/alembic upgrade head &&
/app/.venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000"
env_file: .env
ports:
- "8000:8000"
volumes:
- ./config:/app/config:ro
- ./templates:/app/templates:ro
- ./pdf_mappings:/app/pdf_mappings:ro
- ./archive:/app/archive
- ./confirmations:/app/confirmations:ro
depends_on:
roost-db:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
db_data: