@@ -29,10 +29,11 @@ Key conventions for Towlion application repositories:
2929- Migrations with Alembic (` app/alembic/ ` )
3030- Connection via ` DATABASE_URL ` env var
3131
32- ## Background Tasks
32+ ## Background Tasks (opt-in, not default)
3333- Celery with Redis as broker
3434- Workers run as separate containers
3535- Connection via ` REDIS_URL ` env var
36+ - Not included by default — see README for instructions to re-enable
3637
3738## Environment Variables
3839- All config via env vars, never hardcode secrets
@@ -44,8 +45,25 @@ Key conventions for Towlion application repositories:
4445- Types: ` feat ` , ` fix ` , ` docs ` , ` chore ` , ` refactor ` , ` test ` , ` ci `
4546- No Conventional Commits scope syntax — just ` type: description `
4647
48+ ## Structured Logging
49+ - Uses ` python-json-logger ` — JSON logs to stdout
50+ - Request middleware logs: method, path, status_code, duration_ms, client_ip
51+ - Dockerfile uses ` --no-access-log ` (structured middleware replaces uvicorn access log)
52+
53+ ## Rate Limiting
54+ - Uses ` slowapi ` , default 60 requests/min per IP
55+ - ` /health ` is exempt via ` @limiter.exempt `
56+ - All endpoints need ` request: Request ` parameter for slowapi
57+
4758## Docker
4859- Two compose files: ` docker-compose.yml ` (multi-app), ` docker-compose.standalone.yml ` (full stack)
4960- App container exposes port 8000
5061- Include healthcheck in compose definition
5162- Dockerfile installs ` curl ` (required for healthcheck) and sets ` ENV PYTHONPATH=/app ` (required for alembic)
63+ - Read-only filesystem: ` read_only: true ` + ` tmpfs: [/tmp, /app/__pycache__] ` in compose files
64+ - BuildKit syntax, pip cache mount, build context is ` .. ` (repo root)
65+
66+ ## CI/CD — Reusable Workflows
67+ - All 4 workflows (validate, ci, deploy, preview) call reusable workflows from ` towlion/.github `
68+ - Deploy/preview use ` caddyfile-template ` input with ` __APP_DOMAIN__ ` /` __APP_NAME__ ` placeholders
69+ - Preview also uses ` __PR_NUMBER__ ` /` __PREVIEW_DOMAIN__ ` placeholders
0 commit comments