-
Notifications
You must be signed in to change notification settings - Fork 0
Deploy
github-actions[bot] edited this page Aug 19, 2026
·
1 revision
Production topology (decided 2026-08-19):
| Piece | Where | Cost |
|---|---|---|
| Next.js app |
Vercel (Hobby), auto-deploys main
|
$0 |
| PostgreSQL | Railway (Postgres service only, Hobby plan) | $5/mo (Hobby, incl. usage credit) |
| DB migrations |
GitHub Action migrate.yml
|
— |
Production URL: https://larder-ecru-mu.vercel.app
-
Vercel → Project → Settings → Environment Variables: every variable from Env-Setup with production values. Watch two of them:
-
BETTER_AUTH_URL=https://larder-ecru-mu.vercel.app(auth callbacks break if this is localhost) -
NEXT_PUBLIC_APP_URL= same -
DATABASE_URL= the Railway Postgres public URL
-
-
GitHub → repo → Settings → Secrets and variables → Actions: secret
DATABASE_URL(same Railway URL) — used only by the migration workflow.
Vercel never runs migrations. The standard path is the migrate.yml workflow: it applies migrations to production when src/db/migrations/** changes land on main (plus a manual "Run workflow" button). A local hidden-prompt run (below) is the explicit exception for emergencies. Consequences:
- Code deploy (Vercel) and migration (Action) are not atomic — write backward-compatible, additive migrations (rule in AGENTS.md).
- Locally,
.envmust keep only the localhostDATABASE_URL: drizzle-kit preloads.envwith its own bundled dotenv, so a production URL there would silently point localpnpm db:migrate/db:pushat production. A commented# PROD_DATABASE_URL=line in.envis storage only — nothing reads it; deliberate prod operations enter the URL via a hidden prompt so it never lands in shell history:read -r -s -p 'Prod DATABASE_URL: ' DATABASE_URL && export DATABASE_URL && pnpm db:migrate; unset DATABASE_URL(shell env beats env files).
-
Google OAuth: two authorized redirect URIs —
http://localhost:3000/api/auth/callback/googleandhttps://larder-ecru-mu.vercel.app/api/auth/callback/google. - Resend: until a custom domain is verified, magic-link emails deliver only to the account owner's address (test mode). Domain verification is the launch prerequisite (plan task 7.3).
-
https://larder-ecru-mu.vercel.app/api/health→{"ok":true} -
/loginrenders;/redirects to/loginwhen signed out - After schema changes: the migrate workflow run is green in the Actions tab
Instant realtime (VISION §6.3) will need either a managed channel (Pusher/Ably — serverless-friendly) or moving the app to an always-on host. The client-side splitLink groundwork already exists in src/trpc/client.tsx.