feat(01-01): Next.js 15 project with Docker Compose dev environment

- Next.js 15 with App Router, TypeScript, Tailwind CSS (v4), ESLint
- docker-compose.yml with PostgreSQL 16, Redis 7, and app service
- Dockerfile (Node 20 alpine) for containerized development
- .env and .env.example with DATABASE_URL, DATABASE_URL_LOCAL, REDIS_URL
- src/app/page.tsx updated to render NetForge heading
- All three services start healthy with docker compose up -d
This commit is contained in:
kevin-asprec
2026-03-04 18:24:59 +08:00
parent 7e6d286fca
commit 90bc5836fd
21 changed files with 6918 additions and 0 deletions

24
.env Normal file
View File

@@ -0,0 +1,24 @@
# =============================================================================
# NetForge Local Development Environment
# =============================================================================
# This file is for local development only. Do NOT commit to version control.
# DATABASE_URL is used by the app inside Docker (app -> db service)
DATABASE_URL=postgresql://netforge:netforge_dev@db:5432/netforge_dev
# DATABASE_URL_LOCAL is used when running Prisma CLI from host machine
# e.g., npx prisma db push, npx prisma studio, npx prisma generate
DATABASE_URL_LOCAL=postgresql://netforge:netforge_dev@localhost:5432/netforge_dev
# Redis (inside Docker)
REDIS_URL=redis://redis:6379
# Redis (from host)
REDIS_URL_LOCAL=redis://localhost:6379
# Auth
NEXTAUTH_SECRET=dev-secret-change-in-production
NEXTAUTH_URL=http://localhost:3000
# App
NODE_ENV=development