- Multi-stage Dockerfile: build stage + slim production runner - Runs `next build` + `next start` instead of `npm run dev` - Dev server on port 3001 to avoid conflict with production on 3000 - Deploy script with version bumping and health checks - Explicit .env.production for docker-compose - Updated .gitignore and .dockerignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35 lines
796 B
YAML
35 lines
796 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
app:
|
|
build: .
|
|
ports:
|
|
- "13000:3000"
|
|
env_file:
|
|
- .env.production
|
|
environment:
|
|
- DATABASE_URL=postgresql://root:WKE7xeZohxdZit7eObjG@db:5432/My-Weekly-ToDo-List?schema=public
|
|
- NEXTAUTH_SECRET=Ca7EoJzZSMJO2CkqwdWd
|
|
- NEXTAUTH_URL=https://todo.martin-bierschenk.de
|
|
- NEXT_PUBLIC_BASE_URL=https://todo.martin-bierschenk.de
|
|
depends_on:
|
|
- db
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:15
|
|
environment:
|
|
POSTGRES_DB: My-Weekly-ToDo-List
|
|
POSTGRES_USER: root
|
|
POSTGRES_PASSWORD: WKE7xeZohxdZit7eObjG
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "15432:5432"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|