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
30- Self-host boots standalone with just env vars — see30- Self-host boots standalone with just env vars — see
31 `e2e/setup/selfhost.globalsetup.ts` for the canonical recipe (data dir,31 `e2e/setup/selfhost.globalsetup.ts` for the canonical recipe (data dir,
32 bootstrap admin email/password, base URL, `EXECUTOR_ALLOW_LOCAL_NETWORK`)32 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.
33- Cloud needs WorkOS + Autumn; for a no-.env boot, point it at emulators —36- Cloud needs WorkOS + Autumn; for a no-.env boot, point it at emulators —
34 see `e2e/setup/cloud.globalsetup.ts` for the canonical recipe (the real37 see `e2e/setup/cloud.globalsetup.ts` for the canonical recipe (the real
35 SDKs against emulated services, PGlite dev DB)38 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
34// via real env for anything you care about (esp. BETTER_AUTH_SECRET in prod).34// via real env for anything you care about (esp. BETTER_AUTH_SECRET in prod).
35process.env.EXECUTOR_DATA_DIR ??= fileURLToPath(new URL("./.executor-dev/", import.meta.url));35process.env.EXECUTOR_DATA_DIR ??= fileURLToPath(new URL("./.executor-dev/", import.meta.url));
36process.env.BETTER_AUTH_SECRET ??= "executor-selfhost-dev-secret-change-me-0123456789";36process.env.BETTER_AUTH_SECRET ??= "executor-selfhost-dev-secret-change-me-0123456789";
37process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL ??= "admin@example.com";37if (process.env.EXECUTOR_DEV_SEED_ADMIN === "1") {
38process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD ??= "executor-dev-admin";38 process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL ??= "admin@example.com";
39 process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD ??= "executor-dev-admin";
40}
39process.env.EXECUTOR_WEB_BASE_URL ??= `http://localhost:${DEV_PORT}`;41process.env.EXECUTOR_WEB_BASE_URL ??= `http://localhost:${DEV_PORT}`;
40 42
41// Dev-only: forward /api, /mcp, /docs to the self-host Effect handler in-process43// Dev-only: forward /api, /mcp, /docs to the self-host Effect handler in-process