chore(workspace): DEV origin on the private network — scripts/dev-env.sh (FAUNOSTEO_DEV_HOST detected or set), Supabase CLI wrapper, pnpm dev on the LAN address, config.toml URLs via env(); ENVIRONMENTS.md (identity Faunosteo / faunosteo.com, DEV / STAGING / PROD, exposure table, owner procedure)

The owner tests from other devices of the private network: every test
surface is addressed by the machine's LAN address, never 127.0.0.1 or
localhost, never hard-coded. scripts/dev-env.sh decides the host once
(hostname -I, FAUNOSTEO_DEV_HOST override, production hosts refused);
scripts/supabase.sh exports it for every CLI call (pnpm db:*, pnpm supabase)
because config.toml now reads api.external_url (mail links), auth.site_url
and studio.api_url with env(); scripts/dev.sh = pnpm dev on that origin,
pnpm dev:offline keeps the local tool alone; dev-lan.sh removed.
Verified: GoTrue API_EXTERNAL_URL and Studio SUPABASE_PUBLIC_URL on the LAN
address, a signup mail linking to http://<lan>:54321/auth/v1/verify, the
four published ports answering from a separate Docker network, and the
10-step procedure in headless Chromium at the LAN origin with every request
URL audited (no 127.0.0.1 / localhost).
This commit is contained in:
bchanot committed 2026-10-13 22:06:25 +02:00
1 parent f5865f073f
commit dd4c35c061
14 files changed
+228 -41

No files matched your search

+11 -8
View File
@@ -6,9 +6,11 @@ project_id = "faunosteo"
[api]
enabled = true
port = 54321
# LAN development: the address written into confirmation and recovery mails
# (GoTrue API_EXTERNAL_URL). Keep 127.0.0.1 when working on the host alone.
external_url = "http://192.168.1.100:54321"
# DEV origin (scripts/dev-env.sh, exported by every CLI call through scripts/supabase.sh):
# the address written into confirmation and recovery mails (GoTrue API_EXTERNAL_URL).
# Tests run from other devices of the private network, so it is the host's LAN
# address, never 127.0.0.1 (docs/development/ENVIRONMENTS.md).
external_url = "env(FAUNOSTEO_DEV_API_URL)"
# Only public is exposed through PostgREST. private and audit stay internal
# (docs/development/BACKEND_ARCHITECTURE.md §3).
schemas = ["public"]
@@ -48,7 +50,8 @@ enabled = false
[studio]
enabled = true
port = 54323
api_url = "http://127.0.0.1"
# Origin the remote browser running Studio calls the API on (same DEV origin, no port).
api_url = "env(FAUNOSTEO_DEV_API_ORIGIN)"
# Local mail catcher: confirmation and OTP mails land at http://127.0.0.1:54324
[local_smtp]
@@ -70,10 +73,10 @@ enabled = false
[auth]
enabled = true
# Vite dev server of apps/app
site_url = "http://192.168.1.100:5173"
# LAN access (pnpm dev:lan): confirmation and recovery links must land on the
# address the browser used, so every private-network host on :5173 is allowed.
# Vite dev server of apps/app on the DEV origin (scripts/dev-env.sh)
site_url = "env(FAUNOSTEO_DEV_SITE_URL)"
# Confirmation and recovery links land on the address the browser used: every
# private-network host on :5173 is allowed, plus the host-only forms.
additional_redirect_urls = [
"http://127.0.0.1:5173",
"http://localhost:5173",