wildcard-auth.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Wildcard hosted auth: https://<projectId>.auth.briven.tech → API
  2. # Requires Traefik certificatesResolvers.cloudflare (DNS-01) + CF_DNS_API_TOKEN
  3. # with Zone:DNS:Edit on briven.tech. Until the token can see zone briven.tech,
  4. # magic-link emails use api.briven.tech (valid HTTP-01 cert) via hostedAuthBaseUrl.
  5. #
  6. # Deploy:
  7. # scp infra/traefik/wildcard-auth.yml root@host:/etc/dokploy/traefik/dynamic/wildcard-auth.yml
  8. # # ensure traefik.yml has cloudflare resolver + container has CF_DNS_API_TOKEN
  9. http:
  10. routers:
  11. briven-auth-http:
  12. rule: "HostRegexp(`^.+\\.auth\\.briven\\.tech$`)"
  13. entryPoints:
  14. - web
  15. middlewares:
  16. - redirect-to-https
  17. service: briven-auth-api
  18. briven-auth-https:
  19. rule: "HostRegexp(`^.+\\.auth\\.briven\\.tech$`)"
  20. entryPoints:
  21. - websecure
  22. service: briven-auth-api
  23. tls:
  24. certResolver: cloudflare
  25. domains:
  26. - main: "auth.briven.tech"
  27. sans:
  28. - "*.auth.briven.tech"
  29. services:
  30. briven-auth-api:
  31. loadBalancer:
  32. servers:
  33. - url: "http://briven-brivenfrance-uilsk6-api-1:3001"
  34. passHostHeader: true