28
CodeDev system / System reference

CodeDev deployment and operations

Render/Docker production configuration, PostgreSQL, Cloudinary, Redis/Valkey, migrations, uptime monitoring, health checks, recovery, and deployment verification.

codedevrenderdockerdeploymenthealthzcloudinary

01Production dependencies

ComponentRole
Render web serviceRuns Gunicorn/Flask
PostgreSQLDurable application data
CloudinaryDurable project/media images
Redis/ValkeyShared rate limits for multi-worker production
GitHub ActionsStatic/runtime/dependency/migration checks
/healthzReadiness/health verification

02Critical environment categories

dotenvProduction configuration shape
APP_ENV=production
REQUIRE_POSTGRES=1
COOKIE_SECURE=1
TRUST_PROXY=1
DATABASE_URL=<managed PostgreSQL URL>
MEDIA_STORAGE=cloudinary
CLOUDINARY_URL=<secret>
RATELIMIT_STORAGE_URI=<Redis/Valkey URL>
SECRET_KEY=<strong persistent secret>
MFA_ENCRYPTION_KEY=<persistent Fernet key>
ADMIN_PATH_SEED=<persistent random seed>

03Deployment sequence

  • Build/install pinned dependencies.
  • Run bootstrap/migrations before accepting traffic.
  • Start optional one-per-container uptime helper when enabled.
  • Start Gunicorn with the configured concurrency.
  • Verify the exact deployed commit and /healthz.
  • Perform a critical-flow smoke test: public page, project detail, admin login/MFA, a safe CMS read/write, and media delivery.

04Operational rules

  • Preserve SECRET_KEY, MFA_ENCRYPTION_KEY, and ADMIN_PATH_SEED across normal redeploys.
  • Never paste real secrets into tickets/chat/logs.
  • Use an external uptime monitor; an in-process self-ping cannot detect or wake a fully stopped container.
  • Back up durable data and test restore procedures.
  • Treat failed CI/migrations/health checks as release blockers until understood.