# Traefik CT114 — snippet for Nextcloud Hub (Spec 034)
# Copy to CT114 dynamic config and reload Traefik.
# Backend: Nextcloud on LAN :8080 (TLS terminated here)

http:
  routers:
    nextcloud-hub:
      rule: Host(`cloud.ligbox.com.br`)
      entryPoints:
        - websecure
      service: nextcloud-hub-svc
      tls:
        certResolver: letsencrypt

    # Per-tenant Files — add via file provider or certbot SAN (Spec 017 pattern)
    # nextcloud-files-tenant:
    #   rule: Host(`files.example.com.br`)
    #   service: nextcloud-hub-svc
    #   tls: ...

  services:
    nextcloud-hub-svc:
      loadBalancer:
        servers:
          - url: "http://10.10.10.124:8080"
        # VM124 Nextcloud Hub (Spec 034)
        passHostHeader: true

  middlewares:
    nextcloud-headers:
      headers:
        customRequestHeaders:
          X-Forwarded-Proto: "https"
