Add an optional Caddy service (proxy profile) to compose.prod.yaml for automatic HTTPS on a custom domain, with a Caddyfile that transparently proxies WebSocket upgrades. Move Echo setup into resources/js/echo.ts and derive the Reverb host from window.location when VITE_REVERB_* is unset, so the published image's frontend connects on any domain without a rebuild. The release workflow bakes a fixed public Reverb key and leaves host/port/scheme empty to enable this; the Herd dev setup keeps its explicit VITE_REVERB_* values, so its behaviour is unchanged. Drop the now-unneeded 8080 host port — the WebSocket rides the main HTTP(S) port via the in-container nginx /app proxy.
6 lines
266 B
Caddyfile
6 lines
266 B
Caddyfile
# Caddy serves TryPost on your domain with automatic HTTPS (Let's Encrypt).
|
|
# APP_DOMAIN is provided by the caddy service in compose.prod.yaml.
|
|
# reverse_proxy transparently passes through WebSocket upgrades (Reverb on /app).
|
|
{$APP_DOMAIN} {
|
|
reverse_proxy app:80
|
|
}
|