Initial commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: crowdlending-backend
|
||||
restart: unless-stopped
|
||||
# Port exposé uniquement en dev local — en prod, nginx proxie en interne
|
||||
# ports:
|
||||
# - "4000:4000"
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 4000
|
||||
DB_PATH: /app/data/crowdlending.db
|
||||
UPLOAD_DIR: /app/uploads
|
||||
volumes:
|
||||
- backend_data:/app/data
|
||||
- backend_uploads:/app/uploads
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "fetch('http://localhost:4000/api/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VITE_API_URL: /api
|
||||
container_name: crowdlending-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
backend_data:
|
||||
backend_uploads:
|
||||
Reference in New Issue
Block a user