services:
  brachnha-insights:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: brachnha-insights
    restart: unless-stopped
    ports:
      - "6969:3000"
    environment:
      - NODE_ENV=production
      - PORT=3000
      - APP_PASSWORD=${APP_PASSWORD}
    networks:
      - dokploy-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.brachnha-insights.rule=Host(`bi.brachnha.com`)"
      - "traefik.http.routers.brachnha-insights.entrypoints=websecure"
      - "traefik.http.routers.brachnha-insights.tls=true"
      - "traefik.http.routers.brachnha-insights.tls.certresolver=letsencrypt"
      - "traefik.http.routers.brachnha-insights-http.rule=Host(`bi.brachnha.com`)"
      - "traefik.http.routers.brachnha-insights-http.entrypoints=web"
      - "traefik.http.routers.brachnha-insights-http.middlewares=redirect-to-https"
      - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
      - "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
      - "traefik.http.services.brachnha-insights.loadbalancer.server.port=3000"

networks:
  dokploy-network:
    external: true
