Skip to content

deployment wizard#224

Draft
juligasa wants to merge 5 commits intomainfrom
feat/deployment-wizard
Draft

deployment wizard#224
juligasa wants to merge 5 commits intomainfrom
feat/deployment-wizard

Conversation

@juligasa
Copy link
Collaborator

This script will create a deployment in a self hosted machine. Documentation here https://seed.hyper.media/hm/z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/projects/deployment-self-host-enhacements?l

Replace website_deployment.sh with a Bun/TypeScript deployment system:

- Interactive setup wizard with environment presets (prod/staging/dev)
  that derive testnet and release channel automatically
- Migration wizard that detects old installations, imports secrets,
  and fixes file ownership from the old UID 1001 container setup
- Headless deployment engine with SHA-based change detection, health
  checks, and automatic rollback on failure
- Minimal POSIX shell bootstrap (deploy.sh) for initial setup
- CI workflow to verify the committed dist/deploy.js bundle stays fresh
- Web container now runs as host user via docker compose user: directive,
  eliminating the need for sudo chown during deployment
- Cron setup happens before first deploy so auto-updates survive failures
Bun requires glibc >= 2.25 which excludes old distros like CentOS 7.
Instead of swapping to Node.js (which would create a dev/prod runtime
mismatch), we keep Bun everywhere and fail early with a clear error
message listing minimum supported OS versions.
Major additions to the deployment system:

CLI: add deploy, stop, start, restart, status, config, logs, cron,
backup, restore, uninstall commands with --help and --version flags.
Add --reconfigure flag to re-run the setup wizard with existing values
shown as placeholders (Tab to keep, Enter to clear/skip).

Wizard: move email to last question and make it optional. Use dynamic
placeholders instead of initialValue for text fields so Tab accepts and
Enter clears. Configuration summary shows only user-facing fields with
pencil icon on changed fields during reconfigure.

Status: unicode indicators (checkmark/warning/cross), monitoring section
only shown when metrics profile is active, reconfigure hint on no-change
skip.

Docker: all containers run as host user via SEED_UID/SEED_GID, all bind
mounts use :z for SELinux, rsync uses -rlt instead of -a with non-fatal
wrapper.

Deploy engine: OPS_BASE_URL resolves SEED_DEPLOY_URL/SEED_REPO_URL,
pull-first fast recreate, legacy container cleanup, inline image
pruning, self-update in headless mode.

Tests: 115 tests, 257 assertions covering all pure functions, CLI
parsing, cron building, and self-update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant