changed docker
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user