Next.js frontend for Codebuilder.
pnpm dev(Next.js dev server) loads environment variables in this order:.env.local(preferred for local-only overrides).env
- Docker Compose loads
.envbecausedocker-compose.ymlexplicitly usesenv_file: ./.env.
Important: inside Docker, Postgres must be reached via db:5432 (service name + container port), not localhost.
Run any command as:
pnpm <command>List all available commands:
pnpm runpnpm dev
pnpm build
pnpm build:static
pnpm start
pnpm lintdev: Start Next.js dev server (Turbopack).build: Production build.build:static: Static export build (only if export mode is supported).start: Run production server from.nextbuild output.lint: Run linting.
pnpm dev:db:start
pnpm dev:db:stop
pnpm dev:db:preparedev:db:start: Start the local Postgres container usingdocker-compose.local.yml.dev:db:stop: Stop/remove the local Postgres container.dev:db:prepare: Create the Prisma shadow database inside Postgres (safe to re-run).
pnpm prisma:migrate
pnpm prisma:generate
pnpm prisma:studioprisma:migrate: Run Prisma migrations in development mode.prisma:generate: Regenerate Prisma client.prisma:studio: Launch Prisma Studio.
pnpm prod:up
pnpm prod:down
pnpm prod:logs
pnpm prod:resetprod:up: Rebuild and redeploy the Docker Compose stack (frontend + db). This is the main manual deploy command.prod:down: Stop/remove the stack containers and networks (does not delete external volumes unless--volumesis used).prod:logs: Tail logs for thefrontendservice.prod:reset: WARNING: brings the stack down with--volumesand starts fresh (will wipe DB data).
On push to main, the GitHub Actions workflow rebuilds and redeploys the Docker services on the self-hosted runner.