services:
  dashboard:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: manus-dashboard
    restart: unless-stopped
    ports:
      - "3001:3001"
    environment:
      - NODE_ENV=production
      - PORT=3001
      - JWT_SECRET=manus-dashboard-jwt-secret-2026-recette
      - ADMIN_USERNAME=adminItinova
      - ADMIN_PASSWORD=Itinova69!
      - GITEA_URL=https://git.santinova-soft.org
      - GITEA_USERNAME=manus-admin
      - GITEA_PASSWORD=ManusGitea2026!
      - GITEA_PASSWORD_PROD=ManusGitea2026!
      - GITEA_RECETTE_URL=https://git.recette.santinova-soft.org
      - GITEA_PASSWORD_RECETTE=Itinova69!
      - GITEA_PROD_INTERNAL_URL=http://172.18.0.9:3000
      - APPS_BASE_PATH=/opt/manus-deploy/apps
      - INFRA_BASE_PATH=/opt/manus-deploy/infrastructure
      - HEALTH_CHECK_INTERVAL=30000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/manus-deploy:/opt/manus-deploy
    networks:
      - web
    labels:
      - "traefik.enable=true"
      # Route HTTPS via dashboard.santinova-soft.org
      - "traefik.http.routers.manus-dashboard.rule=Host(`dashboard.santinova-soft.org`)"
      - "traefik.http.routers.manus-dashboard.entrypoints=websecure"
      - "traefik.http.routers.manus-dashboard.tls=true"
      - "traefik.http.routers.manus-dashboard.tls.certresolver=letsencrypt"
      - "traefik.http.routers.manus-dashboard.service=manus-dashboard-svc"
      - "traefik.http.routers.manus-dashboard.priority=100"
      # Service
      - "traefik.http.services.manus-dashboard-svc.loadbalancer.server.port=3001"
      - "traefik.docker.network=web"

networks:
  web:
    external: true
