54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
|
|
services:
|
||
|
|
haunt-fm-db:
|
||
|
|
image: pgvector/pgvector:pg17
|
||
|
|
container_name: haunt-fm-db
|
||
|
|
restart: unless-stopped
|
||
|
|
environment:
|
||
|
|
POSTGRES_DB: ${POSTGRES_DB:-hauntfm}
|
||
|
|
POSTGRES_USER: ${POSTGRES_USER:-hauntfm}
|
||
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||
|
|
volumes:
|
||
|
|
- haunt-fm-db-data:/var/lib/postgresql/data
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-hauntfm}"]
|
||
|
|
interval: 5s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|
||
|
|
networks:
|
||
|
|
- haunt-fm-internal
|
||
|
|
|
||
|
|
haunt-fm:
|
||
|
|
build: .
|
||
|
|
container_name: haunt-fm
|
||
|
|
restart: unless-stopped
|
||
|
|
env_file: .env
|
||
|
|
environment:
|
||
|
|
HAUNTFM_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-hauntfm}:${POSTGRES_PASSWORD}@haunt-fm-db:5432/${POSTGRES_DB:-hauntfm}
|
||
|
|
ports:
|
||
|
|
- "8321:8000"
|
||
|
|
volumes:
|
||
|
|
- haunt-fm-model-cache:/app/model-cache
|
||
|
|
- haunt-fm-audio-cache:/app/audio-cache
|
||
|
|
depends_on:
|
||
|
|
haunt-fm-db:
|
||
|
|
condition: service_healthy
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/health').raise_for_status()"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 10s
|
||
|
|
retries: 3
|
||
|
|
start_period: 60s
|
||
|
|
networks:
|
||
|
|
- haunt-fm-internal
|
||
|
|
- webgateway
|
||
|
|
|
||
|
|
networks:
|
||
|
|
haunt-fm-internal:
|
||
|
|
webgateway:
|
||
|
|
external: true
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
haunt-fm-db-data:
|
||
|
|
haunt-fm-model-cache:
|
||
|
|
haunt-fm-audio-cache:
|