siftlode/docker-compose.localdev.yml
npeter83 65c75d8f05 fix(deploy): apparmor:unconfined for nested Docker
The docker-default AppArmor profile can't be loaded from inside the container; match the
lab convention (finance/arr stacks) of running services unconfined.
2026-06-11 16:42:44 +02:00

33 lines
1.3 KiB
YAML

# Local development against the central (Proxmox) Postgres.
#
# Runs only the webapp/API — no local database, no scheduler — pointed at the shared
# DB on the server. You see the same live data the 24/7 backfill is filling, and you
# never run a second scheduler against it.
#
# Setup: in .env set
# DATABASE_URL=postgresql+psycopg://subfeed:<password>@your-db-host:5432/subfeed
# (use the central DB's host/port and the real POSTGRES_PASSWORD), then:
# docker compose -f docker-compose.localdev.yml up --build
#
# Browse at http://localhost:8080 — Google login works here because the OAuth redirect
# is http://localhost:8080/auth/callback.
#
# Note: the API runs `alembic upgrade head` on startup, so launching this with newer
# local migrations will apply them to the shared DB. For risky schema work, point
# DATABASE_URL at a throwaway local Postgres instead.
services:
api:
build:
context: .
dockerfile: Dockerfile
env_file: .env
environment:
# Exactly one scheduler may write to the shared DB; the server owns it.
SCHEDULER_ENABLED: "false"
# Harmless on Docker Desktop; needed if ever run under Docker-in-LXC.
security_opt:
- apparmor:unconfined
ports:
- "${APP_PORT:-8080}:8000"
restart: unless-stopped