mirror of
https://github.com/arthur-pbty/form.git
synced 2026-06-05 00:06:34 +02:00
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:
+13
-11
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user