Practical, step-by-step instructions for moving Orderly’s hosting from the team’s accounts to the customer’s own accounts, recreating the two backend services fresh under the customer’s own free-tier Render account (a personal Render workspace can’t have members invited — that’s a paid Render Team feature — so services are recreated rather than transferred in place).
This is separate from the GitHub repository transfer, which is already complete (docs/customer-handover.md §1).
docs/customer-handover.md).Both services deploy the same way as documented in src/backend/README.md § “Deploy to Render”:
src/backend)src/db/ via a relative path, and Docker needs both directories in the same build context.src/backend/DockerfileCMD already runs alembic upgrade heads automatically before starting the server, so a fresh database gets its schema created with no manual migration step.https://<service-name>.onrender.com. You’ll need this for Step 4.src/upload-menu-backend)Same steps, but:
src/upload-menu-backend/DockerfileALLOWED_ORIGINS (and optionally TESSERACT_PATH) — no database, no JWT.| Variable | Service | Value |
|---|---|---|
DATABASE_URL |
Recommender | New Postgres connection string (Step 2 below) |
JWT_SECRET_KEY |
Recommender | Generate a new one — openssl rand -hex 32. Never reuse the team’s old value; anyone with the old value could otherwise forge session tokens even after transfer. |
AI_BACKEND |
Recommender | openai |
OPENAI_API_KEY |
Recommender | Customer’s own OpenAI key, not the team’s |
OPENAI_BASE_URL |
Recommender | Optional, has a default |
ALLOWED_ORIGINS |
Both | The Vercel frontend URL, once known (Step 4) |
TESSERACT_PATH |
OCR | Optional |
DATABASE_URL (internal is fine since both live in the same Render account), and the External one for the data migration in Step 3 (that runs from a machine outside Render’s network, so it needs the externally-reachable address).The customer has no access to the team’s existing Render account, so this step is split: the team exports the old data into a file, and hands over that file (never a connection string or password) to whoever performs the restore into the new, customer-owned database.
# Get OLD_EXTERNAL_DATABASE_URL from the team's Render dashboard:
# the existing Postgres service → Info (or Connect) tab → External Database URL
# (behind a "reveal"/copy icon — copy it, don't retype it by hand)
pg_dump "OLD_EXTERNAL_DATABASE_URL" -F c -f orderly_backup.dump
Send orderly_backup.dump itself (e.g. as a file attachment) to whoever does Step 3b — not the connection string used to produce it.
# Get NEW_EXTERNAL_DATABASE_URL the same way, but from the *new* Postgres
# service created in Step 2 (customer's own Render dashboard → the new
# database → Info/Connect tab → External Database URL)
# Schema already exists from `alembic upgrade heads` on first boot of the
# recommender service (Step 1) — --data-only avoids conflicting with it.
# If restoring before the recommender service's first deploy, there's no
# schema yet, so plain pg_restore (without --data-only) also works.
pg_restore --data-only --no-owner -d "NEW_EXTERNAL_DATABASE_URL" orderly_backup.dump
Do not paste either connection string into chat/Slack/etc. — treat them like passwords. orderly_backup.dump itself contains real user data (emails, order history) — handle/delete it like any other data export, not a throwaway file.
The frontend’s backend URLs are a single config point (src/new-frontend/src/config.js), overridable via build-time environment variables — no source code changes needed:
| Vercel environment variable | Value |
|---|---|
REACT_APP_API_URL |
New recommender service URL, e.g. https://<new-name>.onrender.com |
REACT_APP_UPLOAD_URL |
New OCR service URL + /upload-menu, e.g. https://<new-name>.onrender.com/upload-menu |
Set these in the Vercel project (Settings → Environment Variables) — either on the team’s Vercel project before transferring it, or on the customer’s own Vercel project if they’re hosting the frontend themselves too. Redeploy after setting them (env var changes require a new build to take effect, since Create React App bakes them in at build time — a saved env var alone does not update an already-built deployment).
Where to find the frontend’s own live URL (to put in the two backend services’ ALLOWED_ORIGINS above): Vercel project’s Overview page, shown right under the project name — looks like https://<project-name>.vercel.app. Also repeated at the top of every entry under the Deployments tab.
On the new URLs, end to end:
docs/customer-handover.md §1 (who owns what) and §9 (remaining actions) to reflect the new hosting.