Powered by NovaDocs
Welcome to NovaDocsStart with Installation → Install with Docker, or switch language to Polish (PL).

Database & media storage

Admin5 min readUpdated Aug 7, 2026

Database & media storage

Database

NovaDocs uses Prisma. Production should use Postgres.

Apply schema changes

When you update the app and the database schema changed:

bash
npx prisma db push

Use your real DATABASE_URL (local .env or production URL).

Docker:

bash
docker compose exec app npx prisma db push

Supabase tips

  • Use the transaction pooler (port 6543) + pgbouncer=true on Vercel
  • Session mode has a low connection limit and can error under load
  • Optional: set ?schema=novadocs if you want a dedicated schema

Media uploads

When someone uploads an image or file:

  1. Supabase Storage — if SUPABASE_SERVICE_ROLE_KEY is set
  2. Otherwise database storage — file bytes saved in Postgres and served from /api/media/file/...

You do not need local disk folders on the server for uploads.

Enable Supabase Storage

  1. In Supabase → Project Settings → API, copy the service_role key
  2. Add to env:
env
SUPABASE_URL="https://YOUR_PROJECT.supabase.co"
SUPABASE_SERVICE_ROLE_KEY="eyJ..."
  1. Redeploy / restart

NovaDocs will create a public bucket named novadocs-media when needed.

Was this helpful?