services:
  backend:
    container_name: fastapi_backend_prod
    build:
      context: ./be
      dockerfile: Dockerfile.prod
      target: production
    environment:
      - DATABASE_URL=${DATABASE_URL}
      - GEMINI_API_KEY=${GEMINI_API_KEY}
      - SECRET_KEY=${SECRET_KEY}
      - SESSION_SECRET_KEY=${SESSION_SECRET_KEY}
      - SENTRY_DSN=${SENTRY_DSN}
      - LOG_LEVEL=INFO
      - ENVIRONMENT=production
      - CORS_ORIGINS=${CORS_ORIGINS}
      - FRONTEND_URL=${FRONTEND_URL}
    restart: unless-stopped

  frontend:
    container_name: frontend_prod
    build:
      context: ./fe
      dockerfile: Dockerfile.prod
      target: production
    environment:
      - VITE_API_URL=https://mitlistbe.mohamad.dev
    restart: unless-stopped