Commit graph

3 commits

Author SHA1 Message Date
d02e071ddf feat(deploy): publish image to GHCR and document Synology DSM setup
Add a release workflow that publishes a linux/amd64 image to
ghcr.io/richardnixondev/reddit-media-collector on every v* tag, plus a
ready-to-paste docker-compose for Synology Container Manager.

Persist scheduler state across container restarts by reading the DB and
config paths from RMC_SCHEDULER_DB / RMC_SCHEDULER_CONFIG (previously
written to /app, which is not a volume).

Drive-by fixes uncovered while smoke-testing the image:
- Dockerfile now copies README.md (required by pyproject) and drops the
  single-file VOLUME entry that breaks bind mounts; adds an OCI source
  label and a socket-based HEALTHCHECK so Container Manager reflects real
  liveness.
- src/web/app.py uses the new Starlette TemplateResponse signature so the
  index page does not 500 under fresh dependency pins.
2026-05-17 14:48:02 +01:00
b4a2f303ac ci: add mypy job + pre-commit hook, tighten type annotations
- .github/workflows/ci.yml: new 'types' job runs mypy src/; docker now needs lint+types+test
- .pre-commit-config.yaml: add mirrors-mypy hook on src/ with types-requests, types-PyYAML
- pyproject.toml: add per-module overrides ignoring legacy modules (main, downloader, reddit_client, database, extractors.{reddit,gfycat}) while keeping src/web/ strict
- src/web/deps.py: type DOWNLOADS_DIR explicitly as Path
- src/web/config_manager.py: type guards on get_subreddits/users/blacklist returns
- src/web/routers/favorites.py: dict[str, object] for result, avoid in-place + on object
- src/web/routers/media.py: dict[str, object] for delete result
- src/web/rate_limit.py: move Awaitable/Callable under TYPE_CHECKING
- ruff format + auto-fix on src/ + tests/
2026-05-17 11:58:40 +01:00
986f1dfef4 chore: checkpoint baseline (routers, tests, pyproject) 2026-05-17 11:40:35 +01:00