3 Commits

Author SHA256 Message Date
Alphaeus Mote b242509675 feat(deploy): bundled Postgres on the internal network by default [skip ci]
docker-compose.yml gains a postgres service (EXECUTER-DB-00001, official
image pinned by major and digest like NATS, INTERNAL network only, no host
port, pg_isready health check, shm_size, runs as PUID:PGID, data in
${STACK_BINDMOUNTROOT}/${STACK_NAME}/Postgres/Data). It is in the "postgres"
Compose profile; COMPOSE_PROFILES in .env turns it on, and the backend waits
for it healthy (depends_on required: false, so SQLite and external databases
start without it). The backend defaults to DATABASE_PROVIDER=postgres with
DATABASE_CONNECTION_STRING and DATABASE_PASSWORD from .env.
docker-compose.postgres-port.yml publishes a host port, opt-in through
POSTGRES_BIND.

deploy.sh decides the database: what .env names when the operator set it;
else SQLite when API/Data/app.db exists (written to .env, with a note on how
to move); else the bundled Postgres, its password generated into .env (and
exported), never regenerated over an existing database. COMPOSE_PROFILES
follows. The decisions are functions that scripts/tests/Test-DeployDatabase.sh
runs on fixtures without Docker. Compose 2.20.2+ is checked; a new .env is
mode 600. New-LocalSecrets.ps1 generates the password for a new .env and
keeps an existing .env's database settings on -Force.

README: deploy, secrets, Compose, database providers, Postgres backups and
pg_restore, and Moving from SQLite to Postgres (migrate-database).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 06:01:01 -05:00
Alphaeus Mote 39441eced9 feat(auth): record a generated first-start admin password and add reset-admin
An empty INITIAL_ADMIN_PASSWORD now means generate and record: the one-time
password goes to <data>/initial-admin-password.txt (Administrators, SYSTEM and
the server's own account only; mode 600 elsewhere) and the log only says where.
The file is removed once the password is changed or reset. reset-admin (alias
auth-reset) reads the standalone appsettings.json, so it reaches the same
database with the service running or stopped, takes --user/--password, turns
the account back on and is audited. The compose scripts stop generating the
password into .env.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:42:38 -05:00
gsadmin eab5d78ce3 Infra: NATS operator-mode config, Compose stack, Dockerfiles, scripts, WebUI scaffold
- nats.conf: JetStream + WebSocket listener behind reverse proxy, file resolver
- docker-compose(.dev).yml: nats/backend/webui with health checks and volumes
- Multi-stage backend/webui Dockerfiles (non-root, unified version labels)
- Scripts: unified version, build, test, icon generation (ImageMagick via
  winget when missing), agent packaging with checksums, local secrets and
  repo initialization
- SvelteKit WebUI scaffold (Svelte 5, adapter-node, TS) with NATS core,
  nkeys, Monaco and xterm dependencies
- Placeholder icon source + assets/secrets documentation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 18:43:09 -04:00