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
| Area | File | Purpose |
|---|---|---|
| Environment | .env.local | All runtime secrets and connection strings. Loaded automatically by Next.js. |
| Database schema | drizzle.config.ts | Drizzle Kit connection, schema path (lib/db/schema.ts), output directory (drizzle/). Reads DATABASE_URL from .env.local. |
| Next.js runtime | next.config.ts | Standalone output mode, server action body size limit (2 MB). |
| Docker services | docker-compose.yml | Local PostgreSQL 17 instance with health checks and persistent volume. |
| Package scripts | package.json | Dev, 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:
publicandneon_auth(for Neon Auth integration) - Output directory:
drizzle/ - Connection: reads
DATABASE_URLfrom.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.
| Setting | Value |
|---|---|
| Image | postgres:17 |
| User / Password / Database | piyaz / piyaz / piyaz |
| Port | 5432:5432 |
| Volume | pgdata (persistent across restarts) |
| Init script | docker/init-auth.sql (sets up auth schema) |
| Health check | pg_isready -U piyaz every 5 seconds |
The local DATABASE_URL for Docker Compose is:
postgresql://piyaz:piyaz@localhost:5432/piyazPackage scripts
| Script | Command | Purpose |
|---|---|---|
bun run dev | next dev | Start the development server |
bun run build | next build | Production build |
bun run start | next start | Serve production build |
bun run lint | eslint . | Run ESLint |
bun run typecheck | tsc --noEmit | Type-check without emitting |
bun run db:setup | docker compose up -d && sleep 2 && bun run db:push | Start Postgres and push schema |
bun run db:generate | drizzle-kit generate | Generate migration files |
bun run db:push | drizzle-kit push | Push schema directly to database |
bun run db:studio | drizzle-kit studio | Open Drizzle Studio GUI |
For the full list of environment variables, see Environment Variables.