Store PostgreSQL data at ./data/postgres relative to the compose file so persistent data lives on the Unraid disk at /mnt/user/appdata/nuzlocke-tracker/data/postgres. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
951 B
YAML
37 lines
951 B
YAML
services:
|
|
api:
|
|
image: gitea.nerdboden.de/thefurya/nuzlocke-tracker-api:latest
|
|
command: >
|
|
sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000 --app-dir src"
|
|
environment:
|
|
- DEBUG=false
|
|
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/nuzlocke
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
image: gitea.nerdboden.de/thefurya/nuzlocke-tracker-frontend:latest
|
|
ports:
|
|
- "9080:80"
|
|
depends_on:
|
|
- api
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- POSTGRES_DB=nuzlocke
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|