ajouter un Dockerfile et mettre à jour docker-compose.yml pour la configuration de l'application FormCraft

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Puechberty Arthur
2026-04-27 20:54:25 +02:00
parent 4c3809a043
commit 273dd700e9
3 changed files with 65 additions and 11 deletions
+13 -11
View File
@@ -1,19 +1,21 @@
services:
formcraft:
image: node:20-alpine
build:
context: .
dockerfile: Dockerfile
image: formcraft
container_name: formcraft
working_dir: /app
volumes:
- .:/app
- node_modules:/app/node_modules
- formcraft_data:/app/data
ports:
- "3008:3000"
init: true
env_file:
- .env
environment:
- DATABASE_URL=file:./data/dev.db
command: sh -c "apk add --no-cache openssl && npm install --include=dev && npx prisma generate && npx prisma migrate deploy && npm run build && NODE_ENV=production npm start"
NODE_ENV: production
PORT: 3000
ports:
- "${WEB_PORT:-3000}:3000"
volumes:
- formcraft_data:/app/data
restart: unless-stopped
volumes:
node_modules:
formcraft_data: