History

Require opt-in dev admin seeding (#1269)

Rhys Sullivan committed 4 months ago

Commit 41b75eb1 parent b0f36f32 files · +7 −2Browse files

Unified · Split

2 files
  1. RUNNING.md +3 −0
  2. apps/host-selfhost/vite.config.ts +4 −2
RUNNING.md+3−0
@@ -30,6 +30,9 @@ develop on its `main`, publish a bump, then bump the dependency here. The · 29 unmodified lines
3030 - Self-host boots standalone with just env vars — see
3131 `e2e/setup/selfhost.globalsetup.ts` for the canonical recipe (data dir,
3232 bootstrap admin email/password, base URL, `EXECUTOR_ALLOW_LOCAL_NETWORK`)
33+- Self-host Vite dev shows first-run setup by default. Set
34+ `EXECUTOR_DEV_SEED_ADMIN=1` to seed `admin@example.com` /
35+ `executor-dev-admin` instead.
3336 - Cloud needs WorkOS + Autumn; for a no-.env boot, point it at emulators —
3437 see `e2e/setup/cloud.globalsetup.ts` for the canonical recipe (the real
3538 SDKs against emulated services, PGlite dev DB)
apps/host-selfhost/vite.config.ts+4−2
@@ -34,8 +34,10 @@ const DEV_PORT = 5173; · 33 unmodified lines
3434 // via real env for anything you care about (esp. BETTER_AUTH_SECRET in prod).
3535 process.env.EXECUTOR_DATA_DIR ??= fileURLToPath(new URL("./.executor-dev/", import.meta.url));
3636 process.env.BETTER_AUTH_SECRET ??= "executor-selfhost-dev-secret-change-me-0123456789";
37−process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL ??= "admin@example.com";
38−process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD ??= "executor-dev-admin";
37+if (process.env.EXECUTOR_DEV_SEED_ADMIN === "1") {
38+ process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL ??= "admin@example.com";
39+ process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD ??= "executor-dev-admin";
40+}
3941 process.env.EXECUTOR_WEB_BASE_URL ??= `http://localhost:${DEV_PORT}`;
4042
4143 // Dev-only: forward /api, /mcp, /docs to the self-host Effect handler in-process