Ajout de Dockerfile pour la construction et l'exécution de l'application Next.js

This commit is contained in:
Puechberty Arthur
2026-03-31 20:59:45 +02:00
parent 49fd31f4db
commit ec39942050
2 changed files with 41 additions and 17 deletions
+7 -17
View File
@@ -1,21 +1,11 @@
services:
moon:
image: node:20-alpine
working_dir: /app
restart: unless-stopped
web:
build: .
ports:
- "3013:3000"
environment:
NEXT_TELEMETRY_DISABLED: "1"
HOSTNAME: 0.0.0.0
PORT: "3000"
command: >
sh -c "npm ci && npm run build && npx next start -H 0.0.0.0 -p 3000"
- "3000:3000"
volumes:
- ./:/app
- node_modules:/app/node_modules
- next_data:/app/.next
volumes:
node_modules:
next_data:
- /app/node_modules
environment:
- NODE_ENV=development
command: npm run dev