Skip to main content

Staging Environment Setup

Overview

main → production (shikshaos.triverseinfotech.com)
staging → staging (staging-shikshaos.vercel.app or custom subdomain)

One-time setup

1. Create a staging Supabase project

Go to supabase.com → New project → name it shikshaos-staging. Apply all migrations to it:

2. Create the staging git branch

3. Configure Vercel

In the Vercel dashboard for this project:
  1. Settings → Git → Production Branch — keep as main
  2. Settings → Environment Variables — for each variable in .env.staging.example, add it scoped to Preview and set Git branch = staging
Key env vars to scope to staging only: Variables that can be shared with production (same values):
  • NEXT_PUBLIC_LIVEKIT_* — can point to same LiveKit instance
  • SENTRY_DSN — same project, different environment tag

4. Verify the staging deploy

Vercel auto-deploys the staging branch to a preview URL. Check the Vercel dashboard for the URL.

Deploy workflow

  1. Develop on a feature branch
  2. Open PR against main — Vercel creates an ephemeral preview URL
  3. After review, merge to staging for full integration testing
  4. When QA passes, merge stagingmain to ship to production

Running crons against staging

Vercel Cron Jobs only run on production deployments. To test cron jobs against staging:

Database migrations on staging

Always run migrations on staging first: