chore(deploy): use Neon Postgres instead of Render's managed database (#377) - #378
Open
parthrohit22 wants to merge 1 commit into
Open
chore(deploy): use Neon Postgres instead of Render's managed database (#377)#378parthrohit22 wants to merge 1 commit into
parthrohit22 wants to merge 1 commit into
Conversation
…#377) Product decision: deploy on Render's web-service tier, but bring Postgres from Neon (free forever) instead of Render's own managed Postgres (free tier expires after 90 days). - Removed the databases: block that provisioned Render's own partha-db. - DATABASE_URL is now a manual (sync: false) env var, the same pattern already used for AI_ENCRYPTION_KEY -- Parth sets it to Neon's connection string in the Render dashboard after creating the service. No app code change needed: Settings.validate_database_url already normalizes a bare postgres://`/postgresql:// scheme (what Neon hands back) to postgresql+psycopg://. - Updated the file's own setup comment to document the new manual step and reorder the numbered list. Did NOT set a web-service plan/tier. Checked directly against Render's current docs: free web services do not support persistent disks at all, and this service already has one (5GB, for cloned/uploaded repositories). Silently setting plan: free here would produce a blueprint that either fails to deploy as configured or silently drops durable repository storage -- a real product tradeoff, not a safe default for me to pick. Left the existing comment (already correct) documenting this, flagged separately for a decision rather than resolved in this PR. Verified: render.yaml still parses as valid YAML with the expected structure (yaml.safe_load), no orphaned partha-db/fromDatabase references anywhere in the repo. No application code touched. Closes #377
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Product decision: deploy PARTHA on Render's web-service tier, but bring Postgres from Neon (free forever) instead of Render's own managed database (its free tier auto-expires after 90 days). This swaps
render.yaml's database provisioning andDATABASE_URLwiring accordingly — no application code change needed.Linked issue
Closes #377
Scope
render.yamlparses as valid YAML with the expected structure (checked withyaml.safe_load); no orphanedpartha-db/fromDatabasereferences anywhere in the repo.What changed
databases:block that provisioned Render's own managedpartha-dbPostgres instance.DATABASE_URLis now a manual (sync: false) env var — the same pattern already used forAI_ENCRYPTION_KEY— to be set in the Render dashboard to Neon's connection string once the service exists.DATABASE_URLstep, and notes thatapp.core.config.Settings.validate_database_urlalready normalizes a barepostgres:///postgresql://scheme (exactly what Neon hands back) topostgresql+psycopg://— so Neon's connection string can be pasted in as-is.Acceptance criteria completed
render.yamlno longer provisions a Render-managed Postgres database.DATABASE_URLis a manualsync: falseenv var, documented the same wayAI_ENCRYPTION_KEYalready is.Testing performed
No application code, Dockerfile, or other deploy target was touched — this PR is
render.yamlonly.Screenshots
Not applicable (infra config only, no UI change).
Security and data considerations
DATABASE_URLnow carries a full external Postgres connection string (including credentials) as async: falsemanual value — never committed to the repo, set directly in Render's dashboard, same handling as the existingAI_ENCRYPTION_KEYsecret.DATABASE_URL—Settings.validate_database_urlalready normalizes any barepostgres:///postgresql://scheme, which is exactly what Neon (and every other managed Postgres provider) hands back, so this required no code change to support.Flagging explicitly, not resolved in this PR: this service already has a 5GB persistent disk (for cloned/uploaded repositories), and Render's own current documentation states free web services do not support persistent disks at all. I deliberately did not set
plan: free(or any plan) on the web service, since doing so alongside the existing disk would produce a blueprint that either fails to deploy as configured or silently drops durable repository storage. That's a real product tradeoff (pay for a tier that keeps the disk, or accept ephemeral storage on the free tier) for the owner to decide, not something safe for me to default — the file's existing comment already documents this, and I've expanded it slightly for visibility rather than resolving it either way.Dependencies and blocked work
None.
Scope changes or remaining work
None for this PR's own scope. The web-service plan/tier decision (noted above) remains open and is intentionally out of scope here.
Contributor checklist
devupstream/devupstream/devCloses) is used only because the issue is fully resolved