services:
  backlog:
    build: .
    container_name: backlog-aggregator
    restart: unless-stopped
    volumes:
      # Mount project directories for multi-project aggregation
      - /opt/websites:/projects/websites
      - /opt/apps:/projects/apps
      - /opt/gitea-repos:/projects/gitea
    command: ["bun", "src/cli.ts", "aggregator", "--port", "6420", "--paths", "/projects/websites,/projects/apps,/projects/gitea"]
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.backlog.rule=Host(`backlog.jeffemmett.com`)"
      - "traefik.http.routers.backlog.entrypoints=web"
      - "traefik.http.services.backlog.loadbalancer.server.port=6420"
      - "traefik.docker.network=traefik-public"
    networks:
      - traefik-public
    environment:
      - PORT=6420
      - NODE_ENV=production

networks:
  traefik-public:
    external: true
