feat(deploy): central Postgres + scheduler split for Proxmox 24/7 backfill
Add a server compose (full stack, Postgres on the LAN, scheduler on, host-visible pgdata bind mount) and a localdev compose (webapp only, no DB, scheduler off) that points at the central DB. Document the single-shared-database topology, the exactly-one-scheduler rule, and YOUTUBE_API_KEY for unattended backfill that does not depend on a 7-day OAuth refresh token.
This commit is contained in:
parent
93e1d7afc2
commit
79e328af8d
4 changed files with 136 additions and 1 deletions
30
docker-compose.localdev.yml
Normal file
30
docker-compose.localdev.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# 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"
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:8000"
|
||||
restart: unless-stopped
|
||||
Loading…
Add table
Add a link
Reference in a new issue