Skip to content

P-ops.3 — Migrate Postgres from Render free-tier to Neon.tech (persistent, no 30-day expiry) #50

Description

@franciszver

Why: Render free Postgres is deleted ~30 days after creation (the pain #34's runbook works around). Neon's free tier is persistent (autosuspends on inactivity instead of deleting), which permanently removes the monthly re-provision/re-seed fire drill and downgrades #34/#46 to low-urgency.

Not required — the app runs fine on Render Postgres. This is an operational-quality improvement for a demo product.

Scope (mostly config, little/no app code — app already uses DATABASE_URL + postgres://postgresql:// normalization + pool_pre_ping):

  • Provision a Neon project; get the pooled connection string with ?sslmode=require.
  • Set DATABASE_URL to the Neon string as a sync:false secret; remove the databases: block + fromDatabase binding from render.yaml.
  • Run migrations (scripts/setup_db.py via seed) + seed demo data against Neon.
  • Verify /health (database: connected), SSL, and the Neon pooler endpoint under Render's free-tier spin-down.

Watch-items: Neon autosuspend adds ~0.5s cold-start on first query (on top of Render spin-down) — acceptable for demo, pool_pre_ping absorbs stale conns; confirm psycopg SSL args; free tier 0.5 GB / limited compute hours (ample here).

Red-first: a connectivity check (or extend the existing startup DB-retry test) proving the app boots + /health reports connected against a Neon-style SSL connection string.

Done when: production runs on Neon, /health green, demo login + data verified; render.yaml no longer declares a managed Postgres; #34 runbook annotated as superseded (or updated for Neon's model).

Definition of Done: branch → PR Closes #<this> → 3 gates → CI green → merged; owner provisions the Neon project / supplies the connection string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogOpen, not yet startedopsDeployment/infra/operationspriority:mediumMedium priority

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions