# gig-platform instances. Copy to the infra Caddy's sites/ directory. # # Every instance's nginx joins the external `edge` network as # gig-platform--nginx; so do main's permission gates. See # docs/deploy/instances.md. # main. Its own site, not a case of the wildcard below: Caddy indexes host # labels from the right, so {http.request.host.labels.4} is `pr-57` for # pr-57.gig-platform.dev.kucial.com but empty for the apex, which would proxy # to `gig-platform--nginx`. # # gig-api.kucial.com is main's canonical, public name (APP_URL), carried by the # preview tunnel: Cloudflare's free Universal SSL covers kucial.com and # *.kucial.com only, so a public name cannot sit under dev.kucial.com's extra # level. The dev apex stays as a LAN alias. gig-api.kucial.com, gig-platform.dev.kucial.com { import cloudflare_tls reverse_proxy gig-platform-main-nginx:80 } *.gig-platform.dev.kucial.com { import cloudflare_tls # main's internal surfaces. These labels are reserved: instance names are # restricted to main, e2e and pr-, so none can collide with them. @studio host studio.gig-platform.dev.kucial.com @objects host objects.gig-platform.dev.kucial.com @horizon host horizon.gig-platform.dev.kucial.com handle @studio { reverse_proxy gig-platform-main-db-studio-gate:80 } handle @objects { reverse_proxy gig-platform-main-objectstore-console-gate:80 } handle @horizon { reverse_proxy gig-platform-main-horizon-gate:80 } handle { # Per-request placeholder upstream: e2e and pr- instances. A name # that resolves to nothing — a closed PR — returns 502. # # Placeholder upstreams share one upstream's health and load-balancing # state across every instance, so never add health checks here. reverse_proxy gig-platform-{http.request.host.labels.4}-nginx:80 } }