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:
42
.env.example
Normal file
42
.env.example
Normal file
@@ -0,0 +1,42 @@
|
||||
# =============================================================================
|
||||
# NetForge Environment Variables
|
||||
# =============================================================================
|
||||
# Copy this file to .env and fill in your values.
|
||||
# Never commit .env to version control.
|
||||
|
||||
# =============================================================================
|
||||
# DATABASE
|
||||
# =============================================================================
|
||||
|
||||
# Use this URL when running the app INSIDE Docker (app service connects to db service)
|
||||
DATABASE_URL=postgresql://netforge:netforge_dev@db:5432/netforge_dev
|
||||
|
||||
# Use this URL when running Prisma commands FROM THE HOST (e.g., npx prisma db push, npx prisma studio)
|
||||
# The host connects to PostgreSQL exposed on localhost:5432
|
||||
DATABASE_URL_LOCAL=postgresql://netforge:netforge_dev@localhost:5432/netforge_dev
|
||||
|
||||
# =============================================================================
|
||||
# REDIS
|
||||
# =============================================================================
|
||||
|
||||
# Use when running inside Docker
|
||||
REDIS_URL=redis://redis:6379
|
||||
|
||||
# Use when connecting from host
|
||||
REDIS_URL_LOCAL=redis://localhost:6379
|
||||
|
||||
# =============================================================================
|
||||
# AUTHENTICATION
|
||||
# =============================================================================
|
||||
|
||||
# Change this to a long random string in production!
|
||||
# Generate with: openssl rand -base64 32
|
||||
NEXTAUTH_SECRET=dev-secret-change-in-production
|
||||
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
|
||||
# =============================================================================
|
||||
# APPLICATION
|
||||
# =============================================================================
|
||||
|
||||
NODE_ENV=development
|
||||
Reference in New Issue
Block a user