Skip to content

Add Render deploy Blueprint#2314

Closed
Ho1yShif wants to merge 6 commits into
fastapi:masterfrom
Ho1yShif:add-render-deploy-blueprint
Closed

Add Render deploy Blueprint#2314
Ho1yShif wants to merge 6 commits into
fastapi:masterfrom
Ho1yShif:add-render-deploy-blueprint

Conversation

@Ho1yShif
Copy link
Copy Markdown

Changes

  • render.yaml — Render Blueprint for one-click deploy (Docker backend, static frontend, managed Postgres, shared env group).
  • backend/scripts/start.sh — restore the single-command startup script. Render's container model has no equivalent of compose's separate prestart service (no "wait for sidecar to complete"), so combining prestart.sh and fastapi run into one script is the cleanest fit for Render's Docker command.
  • README.md — adds a "Deploy to Render" section with the button and setup steps.

Local Docker Compose workflows are unchanged.

Test plan

  • One-click deploy via the button provisions backend, frontend, and Postgres.
  • Backend runs migrations + creates initial superuser via prestart.sh, then serves on $PORT.
  • Frontend builds with VITE_API_URL baked in and serves the SPA.
  • Health check at /api/v1/utils/health-check/ returns 200.

Ho1yShif and others added 6 commits May 28, 2026 22:43
Render's envVarGroups don't accept sync: false placeholders, which
silently dropped FIRST_SUPERUSER, FIRST_SUPERUSER_PASSWORD, FRONTEND_HOST,
BACKEND_CORS_ORIGINS, SMTP credentials, EMAILS_FROM_EMAIL, SENTRY_DSN, and
VITE_API_URL on apply. Move each to its consuming service (backend or
frontend) and keep the env group for shared, non-secret defaults only.
Also move SECRET_KEY (backend-only) to the backend service and drop the
unused DOMAIN variable. README setup steps updated to point users at the
correct service Environment pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Upstream deleted backend/scripts/start.sh and split its responsibilities:
the Dockerfile CMD now runs fastapi directly, and prestart.sh runs in a
separate compose service. Render has no equivalent of "wait for sidecar to
complete," and the existing Render service is configured with
`bash scripts/start.sh` as its Docker command. Restore the file with its
prior contents so the deploy works without any Dashboard config changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Render auto-sets WEB_CONCURRENCY based on the instance's CPU/memory (1 on
the free tier). Hardcoding --workers 4 caused workers to be OOM-killed
on the free tier — the parent kept respawning replacements, producing a
steady stream of "Child process died" messages and wasted resources.
Default to 1 if WEB_CONCURRENCY is unset.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…late

For upstream PR — if merged, the Blueprint lives in fastapi/..., so the
deploy button and render.yaml repo: field should point there.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Ho1yShif
Copy link
Copy Markdown
Author

Closing to reopen from a more clearly-named branch (Ho1yShif:fastapi).

@Ho1yShif Ho1yShif closed this May 29, 2026
@Ho1yShif Ho1yShif deleted the add-render-deploy-blueprint branch May 29, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants