Skip to content

Add Render Blueprint for app + realtime + cron deployment - #6800

Open
glennrm27 wants to merge 3 commits into
simstudioai:mainfrom
glennrm27:add-render-blueprint
Open

Add Render Blueprint for app + realtime + cron deployment#6800
glennrm27 wants to merge 3 commits into
simstudioai:mainfrom
glennrm27:add-render-blueprint

Conversation

@glennrm27

Copy link
Copy Markdown

Mirrors docker-compose.prod.yml topology (shared Postgres/Redis) for one-click deploy via Render's Blueprint feature.

Summary

Brief description of what this PR does and why.

Fixes #(issue)

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

How has this been tested? What should reviewers focus on?

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Mirrors docker-compose.prod.yml topology (shared Postgres/Redis) for
one-click deploy via Render's Blueprint feature.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@cursor

cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Infrastructure-only Blueprint addition with no runtime code changes; misconfigured env vars or migrations service behavior could affect production deploys but does not alter application logic in this diff.

Overview
Adds a new render.yaml Render Blueprint so Sim can be deployed from the dashboard with the same topology as docker-compose.prod.yml: shared Postgres (sim-db), Redis (sim-redis), web sim-app, web sim-realtime, worker sim-cron, and private sim-migrations running bun run db:migrate.

Env wiring uses groups for shared secrets (BETTER_AUTH_SECRET, INTERNAL_API_SECRET, ENCRYPTION_KEY, CRON_SECRET) and R2/S3 storage defaults; database and Redis URLs are linked via Blueprint references, with SOCKET_SERVER_URL / SIM_URL wired to internal hostport between services.

The file documents manual post-sync steps: enable pgvector, fill sync: false vars (public URLs, R2 credentials), align auth URLs across app and realtime, and validate whether sim-migrations as a private service matches desired one-shot migrate behavior vs a Render Job.

Reviewed by Cursor Bugbot for commit 70c5f80. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a Render Blueprint for deploying the app, realtime service, cron worker, migrations, Postgres, and Redis. It also centralizes generated secrets and dashboard-supplied storage and URL configuration.

  • Provisions shared Postgres and Redis resources.
  • Defines app, realtime, cron, and migration services using the existing Dockerfiles.
  • Adds shared secret and R2 storage environment groups.
  • Requires several public URLs, credentials, and pgvector setup after the first Blueprint sync.

Confidence Score: 4/5

This PR should not merge until the internal realtime and app service references are converted into valid absolute HTTP URLs.

The Blueprint passes scheme-less hostport values directly to fetch and curl consumers, preventing realtime notifications and all cron-triggered endpoint requests from working on Render.

Files Needing Attention: render.yaml

Important Files Changed

Filename Overview
render.yaml Adds the complete Render deployment topology, but its internal service references provide bare host-and-port values where app and cron consumers require absolute HTTP URLs.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Browser[Browser] --> App[sim-app]
  Browser --> Realtime[sim-realtime]
  App --> DB[(Postgres)]
  App --> Redis[(Redis)]
  App --> Realtime
  Realtime --> DB
  Realtime --> Redis
  Cron[sim-cron] --> App
  Migrations[sim-migrations] --> DB
Loading

Reviews (1): Last reviewed commit: "Add Render Blueprint for app + realtime ..." | Re-trigger Greptile

Comment thread render.yaml
Comment on lines +119 to +124
- key: SIM_AGENT_API_URL
sync: false
# Internal (server-side) address of sim-realtime.
- key: SOCKET_SERVER_URL
fromService:
type: web

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Scheme-less internal service URLs

When sim-app sends a realtime notification or sim-cron invokes a scheduled endpoint, Render supplies these hostport references as bare host:port values. The consumers interpolate them directly into fetch and curl URLs without adding a scheme, causing realtime notifications and scheduled processing to fail URL parsing.

Comment thread render.yaml
# sim-app only, but kept here so it's generated once, in one place.
# Cannot be changed later without losing stored credentials.
- key: ENCRYPTION_KEY
generateValue: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid auto-generated encryption key

High Severity

ENCRYPTION_KEY uses generateValue: true, but Render generates a base64 256-bit secret (~44 chars), not the 64-character hex string the app requires. Credential encrypt/decrypt will throw at runtime once anything tries to use ENCRYPTION_KEY.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ddae21f. Configure here.

Comment thread render.yaml
fromService:
type: web
name: sim-realtime
property: hostport

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal URLs missing HTTP scheme

High Severity

SOCKET_SERVER_URL and SIM_URL are wired from hostport, which is bare host:port with no scheme. Compose and Helm use full http://… URLs; server fetch and cron curl need a scheme, so realtime notifications and all scheduled jobs will fail to reach their targets.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ddae21f. Configure here.

Comment thread render.yaml
isn-glenn and others added 2 commits August 18, 2026 10:48
Render's Blueprint schema has no service-level envVarGroups field —
groups are attached per-entry inside a service's envVars list via
fromGroup, not with a separate top-level key on the service.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Render removed the legacy Starter/Standard/Pro Postgres plan names for
new databases in favor of Basic/Pro/Accelerated tiers named by RAM.
basic-4gb is the closest match to the old 'standard' size.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 70c5f80. Configure here.

Comment thread render.yaml
# replaced Starter/Standard/Pro with Basic/Pro/Accelerated tiers named by
# RAM. basic-4gb is the closest new-tier match to the old 'standard' size;
# resize up (pro-*) or down (basic-1gb/basic-256mb) as load requires.
plan: basic-4gb

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong Postgres plan for Standard

Medium Severity

The Blueprint replaces legacy standard with basic-4gb, and the comment calls that the closest match. Legacy Standard is 1 GB RAM; basic-1gb is the RAM- and price-aligned successor, while basic-4gb matches legacy Pro (4 GB). One-click deploys get roughly 4× the intended DB cost and capacity relative to the old plan this change claims to replace.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 70c5f80. Configure here.

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.

1 participant