changed docker

This commit is contained in:
2025-08-27 17:37:22 -05:00
parent 93301696cf
commit 1832f98d40
3 changed files with 82 additions and 30 deletions

View File

@@ -1,38 +1,42 @@
version: '3.8'
services:
# Development service
# ---- Development ----
app-dev:
build:
context: .
dockerfile: Dockerfile
target: dev
ports:
- "3000:3000"
volumes:
- .:/app
- /app/node_modules
- /app/.next
environment:
- NODE_ENV=development
command: npm run dev
profiles:
- dev
- HOSTNAME=0.0.0.0
# Hot-Reload & persistente Caches
volumes:
- .:/app
- node_modules:/app/node_modules
- next:/app/.next
# CMD kommt aus Dockerfile (npm run dev)
profiles: [dev]
# Production service
# ---- Production ----
app-prod:
build:
context: .
dockerfile: Dockerfile
# target: runner # (optional; letzter Stage ist ohnehin runner)
ports:
- "3000:3000"
- "3010:3000"
environment:
- NODE_ENV=production
- SITE_URL=${SITE_URL:-https://hamtonbrown.com}
- CONTACT_TO_EMAIL=${CONTACT_TO_EMAIL:-contact@hamtonbrown.com}
- RESEND_API_KEY=${RESEND_API_KEY}
restart: unless-stopped
profiles:
- prod
profiles: [prod]
volumes:
node_modules:
next:
networks:
default: