mirror of
https://github.com/arthur-pbty/chrono.git
synced 2026-06-11 15:55:48 +02:00
Ajout de Dockerfile pour la construction et l'exécution de l'application Next.js
This commit is contained in:
+8
-22
@@ -1,25 +1,11 @@
|
||||
services:
|
||||
chrono:
|
||||
image: node:22-alpine
|
||||
container_name: chrono-app
|
||||
working_dir: /app
|
||||
web:
|
||||
build: .
|
||||
ports:
|
||||
- "3015:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- HOSTNAME=0.0.0.0
|
||||
- PORT=3000
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- .:/app
|
||||
- node_modules:/app/node_modules
|
||||
command: sh -c "npm install && npm run build && npm start"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
node_modules:
|
||||
- ./:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
command: npm run dev
|
||||
Reference in New Issue
Block a user