Point OpenCut to a Remote Postgres

Managed Postgres services (Supabase, Railway, Neon, RDS) work once the connection string is updated.

Example configuration

DATABASE_URL="postgresql://user:password@db.example.com:5432/opencut?sslmode=require"
POOL_MIN=1
POOL_MAX=10

Reload the Next.js server so the new variables apply.

Apply migrations

cd apps/web
bun run db:migrate

Drizzle will create tables remotely. Verify with psql:

psql "$DATABASE_URL" -c '\dt'

Recommended flags

  • Add statement_timeout=60000 if exports run long.
  • Use connection pooling (pgBouncer) to stay within limits.
  • Store credentials in your platform secret manager instead of .env.local when deploying.

Diagram

  flowchart LR
    A[OpenCut Next.js] -->|Prisma client| B[pgBouncer]
    B --> C[Managed Postgres]

Monitor connection counts in your provider dashboard to ensure the editor does not exhaust limits.