piyaz
Reference

Configuration

Application configuration options for Next.js, Drizzle, and Docker Compose.

Configuration

Piyaz is configured through environment variables and a small set of config files. There is no unified config file; each layer owns its own.

Configuration surfaces

AreaFilePurpose
Environment.env.localAll runtime secrets and connection strings. Loaded automatically by Next.js.
Database schemadrizzle.config.tsDrizzle Kit connection, schema path (lib/db/schema.ts), output directory (drizzle/). Reads DATABASE_URL from .env.local.
Next.js runtimenext.config.tsStandalone output mode, server action body size limit (2 MB).
Docker servicesdocker-compose.ymlLocal PostgreSQL 17 instance with health checks and persistent volume.
Package scriptspackage.jsonDev, build, lint, typecheck, and database management commands.

Next.js configuration

next.config.ts sets two options:

  • output: "standalone": produces a self-contained build for container deployments.
  • serverActions.bodySizeLimit: "2mb": allows larger payloads for task and context operations.

No other Next.js configuration is customized. Defaults apply for everything else.

Drizzle configuration

drizzle.config.ts connects Drizzle Kit to your database for migrations and schema pushes.

  • Schema path: lib/db/schema.ts
  • Schema filters: public and neon_auth (for Neon Auth integration)
  • Output directory: drizzle/
  • Connection: reads DATABASE_URL from .env.local (manually loaded since Drizzle Kit does not auto-load .env.local)

drizzle.config.ts manually parses .env.local because Drizzle Kit does not support Next.js env loading. If you rename your env file, update the path in drizzle.config.ts.

Docker Compose

docker-compose.yml runs a local PostgreSQL 17 instance for development.

SettingValue
Imagepostgres:17
User / Password / Databasepiyaz / piyaz / piyaz
Port5432:5432
Volumepgdata (persistent across restarts)
Init scriptdocker/init-auth.sql (sets up auth schema)
Health checkpg_isready -U piyaz every 5 seconds

The local DATABASE_URL for Docker Compose is:

postgresql://piyaz:piyaz@localhost:5432/piyaz

Package scripts

ScriptCommandPurpose
bun run devnext devStart the development server
bun run buildnext buildProduction build
bun run startnext startServe production build
bun run linteslint .Run ESLint
bun run typechecktsc --noEmitType-check without emitting
bun run db:setupdocker compose up -d && sleep 2 && bun run db:pushStart Postgres and push schema
bun run db:generatedrizzle-kit generateGenerate migration files
bun run db:pushdrizzle-kit pushPush schema directly to database
bun run db:studiodrizzle-kit studioOpen Drizzle Studio GUI

For the full list of environment variables, see Environment Variables.

On this page