docker-compose.yml 716 B

1234567891011121314151617181920212223242526272829303132
  1. version: '3.8'
  2. services:
  3. backend:
  4. build:
  5. context: ./backend
  6. dockerfile: Dockerfile
  7. ports:
  8. - "3001:3001"
  9. volumes:
  10. - ./backend/uploads:/app/uploads
  11. environment:
  12. - NODE_ENV=production
  13. - JWT_SECRET=${JWT_SECRET:-change_this_secret_in_production}
  14. - DB_HOST=${DB_HOST}
  15. - DB_PORT=${DB_PORT:-3306}
  16. - DB_USER=${DB_USER}
  17. - DB_PASSWORD=${DB_PASSWORD}
  18. - DB_NAME=${DB_NAME:-gestion_locative}
  19. restart: unless-stopped
  20. frontend:
  21. build:
  22. context: ./frontend
  23. dockerfile: Dockerfile
  24. args:
  25. VITE_API_URL: http://localhost:3001
  26. ports:
  27. - "3000:80"
  28. depends_on:
  29. - backend
  30. restart: unless-stopped