scripts/avatar-e2e.sh read the DEV keys through `supabase status`, started the worker on the DEV network and let the suite write and purge on DEV. Port the V1-2 sandbox runner (`db-sandbox.sh avatar-e2e`: loopback gateway, worker in a 600 env file) and the guarded suite (fixed URL, container and key issuer, per-run accounts); refusals and the positive run proven under strace in .claude/audits/2026-11-02-avatar-e2e-sandbox-only.md.
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/db-sandbox.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"
|