version: '3.8' services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: gestion_locative POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres volumes: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" restart: unless-stopped backend: build: context: ./backend dockerfile: Dockerfile ports: - "3001:3001" volumes: - ./backend/uploads:/app/uploads environment: - NODE_ENV=production - JWT_SECRET=change_this_secret_in_production - PGHOST=postgres - PGPORT=5432 - PGUSER=postgres - PGPASSWORD=postgres - PGDATABASE=gestion_locative depends_on: - postgres restart: unless-stopped frontend: build: context: ./frontend dockerfile: Dockerfile args: VITE_API_URL: http://localhost:3001 ports: - "3000:80" depends_on: - backend restart: unless-stopped volumes: postgres_data: