feat: main's public hostnames, and drop the retired legacy stack

Cloudflare's free Universal SSL covers kucial.com and *.kucial.com only, so a
hostname published through the tunnel cannot sit under dev.kucial.com's extra
level — it fails TLS at the edge whatever the tunnel says. main is therefore
reached at gig-api.kucial.com publicly and gig-platform.dev.kucial.com on the
LAN (gig-web.kucial.com for gig-app), while the LAN-only instances keep their
deeper names, which Caddy serves with its own DNS-01 certificates.

sites/legacy-gig.caddy is removed: the old preview stack is retired, and its
gig-api.kucial.com block would now collide with main's.

`caddy validate` passes against the custom Cloudflare-DNS build.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LpmavGWZa9nKFwpeLLW4D3
This commit is contained in:
2026-09-17 19:31:13 +08:00
co-authored by Claude Opus 5
parent 6379e8c147
commit 8e919c74d0
4 changed files with 24 additions and 58 deletions
+10 -5
View File
@@ -4,11 +4,16 @@
# gig-platform-<instance>-nginx; so do main's permission gates. See
# docs/deploy/instances.md.
# main, at the apex. 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-platform.dev.kucial.com {
# 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
}