Files
crowdlending-app/docker-compose.yml
T
Olivier CROGUENNEC 48ed7fe65e Initial commit
2026-06-13 14:57:15 +02:00

47 lines
1.1 KiB
YAML

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: