| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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
- # SSO OIDC (optionnel — laisser vide pour désactiver)
- - OIDC_ISSUER=${OIDC_ISSUER:-}
- - OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-}
- - OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET:-}
- - OIDC_REDIRECT_URI=${OIDC_REDIRECT_URI:-http://localhost:3001/api/auth/oidc/callback}
- - OIDC_SCOPE=${OIDC_SCOPE:-openid email profile}
- - OIDC_BUTTON_LABEL=${OIDC_BUTTON_LABEL:-Se connecter via SSO}
- - FRONTEND_URL=${FRONTEND_URL:-http://localhost:3000}
- 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:
|