Owner run: the CLI prints 'All services bind to 0.0.0.0' and ignored the rootless daemon's default address; the gateway could not share 54321/54324 with 0.0.0.0 listeners. Now: Kong serves the API directly; the DEV gateway serves only Mailpit with basic auth on <DEV host>:54325; ENVIRONMENTS.md §3 gives the exact UFW rules (interface-scoped deny on 54322-54324, two cases by current UFW state), rollback and impact; dev:net-check proves the allowed surfaces from a distinct Docker network (5/5 OK) and prints the refusal checks to run from another device, since a rootless container's traffic to the host is delivered locally and cannot see the LAN firewall. LRN-053 corrects LRN-052.
28 lines
1.5 KiB
Bash
28 lines
1.5 KiB
Bash
#!/usr/bin/env bash
|
|
# shellcheck shell=bash
|
|
# The one place the DEV origin is decided (docs/development/ENVIRONMENTS.md §2).
|
|
# Sourced by the wrappers (scripts/supabase.sh, scripts/dev.sh, scripts/avatar-e2e.sh):
|
|
# every service the browser of another device must reach is addressed by the
|
|
# host's LAN address, never by 127.0.0.1 or localhost.
|
|
#
|
|
# FAUNOSTEO_DEV_HOST the address or name of this machine on the private network;
|
|
# unset = the first non-loopback IPv4 of the host; 127.0.0.1 for
|
|
# a host-only session. Never a production host.
|
|
#
|
|
# Exports FAUNOSTEO_DEV_HOST and the derived URLs read by supabase/config.toml
|
|
# (env() substitution) and by the Vite dev server.
|
|
if [ -z "${FAUNOSTEO_DEV_HOST:-}" ]; then
|
|
FAUNOSTEO_DEV_HOST="$(hostname -I 2>/dev/null | awk '{print $1}')"
|
|
[ -n "$FAUNOSTEO_DEV_HOST" ] || FAUNOSTEO_DEV_HOST=127.0.0.1
|
|
fi
|
|
case "$FAUNOSTEO_DEV_HOST" in
|
|
*faunosteo.com*) echo "dev-env: FAUNOSTEO_DEV_HOST must never be a production host ($FAUNOSTEO_DEV_HOST)" >&2; return 1 ;;
|
|
esac
|
|
export FAUNOSTEO_DEV_HOST
|
|
export FAUNOSTEO_DEV_API_ORIGIN="http://$FAUNOSTEO_DEV_HOST"
|
|
export FAUNOSTEO_DEV_API_URL="http://$FAUNOSTEO_DEV_HOST:54321"
|
|
export FAUNOSTEO_DEV_SITE_URL="http://$FAUNOSTEO_DEV_HOST:5173"
|
|
export FAUNOSTEO_DEV_STUDIO_URL="http://$FAUNOSTEO_DEV_HOST:54323"
|
|
# Mailpit for other devices goes through the DEV gateway (basic auth), never the raw 54324.
|
|
export FAUNOSTEO_DEV_MAILPIT_URL="http://$FAUNOSTEO_DEV_HOST:54325"
|