siftlode/docker-compose.localdev.yml
npeter83 882429d6af feat(version): /api/version + build-time version/commit stamping
Add a VERSION file (0.1.0) and inject APP_VERSION/GIT_SHA/BUILD_DATE as Docker
build-args (both stages; Vite inlines them into the SPA). New public GET
/api/version returns app_version, git_sha, build_date and the Alembic head as the
database revision. deploy.sh and the localdev build pass the args.
2026-06-15 00:06:57 +02:00

37 lines
1.4 KiB
YAML

# Local development against the central Postgres (an always-on host that also runs the scheduler).
#
# 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
args:
APP_VERSION: ${APP_VERSION:-dev}
GIT_SHA: ${GIT_SHA:-unknown}
BUILD_DATE: ${BUILD_DATE:-}
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