Skip to content

Commit d85dc85

Browse files
authored
Merge pull request #660 from lelabdev/589-local-bootstrap
feat(dashboard): explicit, safe local PostgreSQL setup (#589)
2 parents 915f29f + 30ece3b commit d85dc85

15 files changed

Lines changed: 2609 additions & 183 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"svforge": minor
3+
---
4+
5+
Dashboard projects now ship an explicit, safe local-development setup (#589):
6+
7+
- `bash scripts/setup.sh` still prepares only the private `.env` and a strong Better Auth secret by default; `--compose` generates a loopback-only `docker-compose.yml` (PostgreSQL 17, named volume, health check, per-project random password) and starts it, `--init-schema` generates the pending Better Auth schema and runs `db:push` **only** against that verified local Compose database, and `--admin` creates the first administrator from `ADMIN_NAME`/`ADMIN_EMAIL` (generating a password into the ignored `.env` when missing, never printing it; an existing admin is a no-op).
8+
- Generated Dashboards expose `<pm> run dev:setup` and `<pm> run dev:local`; plain `dev` and project creation stay side-effect free, and `svforge create` offers the setup only interactively (headless runs print the exact command instead).
9+
- Existing `docker-compose.yml` files are reused only when they carry the SVForge ownership marker and match the managed service exactly; anything else is refused before credentials are written or Compose runs. Schema initialization validates the effective Compose model (parsed by Compose, including interpolation), refuses override files and ambient `COMPOSE_*` controls, verifies the exact URL credentials/port, the running service's published port and its database identity, and runs `auth:schema`/`db:push`/`admin:create` with a sanitized environment so an exported `DATABASE_URL` can never redirect them away from the verified local `.env` connection. and `--admin` relies on a dedicated exit code (3 = already exists) instead of message text.
10+
- `setup.sh` reruns preserve secrets, volumes and rows; `.env` stays Git-ignored with mode 600; external `DATABASE_URL` values are never replaced and never receive automatic migrations.

0 commit comments

Comments
 (0)