Files
Aleksandr Meshchryakov 15f5523f9b
Some checks failed
State Corp Backend CI/CD / Quality gate (push) Failing after 9m34s
State Corp Backend CI/CD / Build linux/amd64 images once (push) Has been skipped
State Corp Backend CI/CD / Release dev (push) Has been skipped
State Corp Backend CI/CD / Refresh and release internal main (push) Has been skipped
State Corp Backend CI/CD / Release customer main (push) Has been skipped
Complete SSO role mapping and offline StateCorp release tooling
2026-09-24 14:14:50 +02:00

30 lines
1.9 KiB
Markdown

# StateCorp isolated installation
`build-release.sh FRONTEND_CHECKOUT RELEASE_DIRECTORY RELEASE_ID` builds five
`linux/amd64` OCI image archives and an immutable release manifest. Run it on a
connected build host with Docker Buildx and `jq`; the target host needs only Docker
and Compose. The release directory can be transported as a tar archive. It contains
no database, media, private key, shared exchange token, or populated `.env`.
On the isolated host, unpack the release, run `./install.sh install` once to create
`.env`, set strong local credentials and host names there, then run it again. Supply
the IAS ECP public PEM separately at `secrets/sso-public.pem`; only enable SSO after
validating the callback and `SSO_GROUP_ROLE_MAP_JSON` allowlist. The PEM is mounted
read-only at `/run/secrets/sso_public_key` and is not stored in the archive.
`./install.sh health` checks Compose state and the backend readiness endpoint.
For an upgrade, retain a verified database backup separately and replace only
the release files (`compose.yml`, `env.example`, `install.sh`, `README.md`,
`release-manifest.json`, `SHA256SUMS`, and `images/`) **in the existing installation
directory**. Do not replace `.env` or `secrets/`, and do not remove the
Compose-managed database, Redis, media, or staticfiles volumes.
Then run `./install.sh upgrade`; it preserves local credentials and switches image
pins to the new release. `rollback`
reselects previous image names from `.env.previous` only; it does not reverse schema
migrations or restore a database. A full rollback requires the separate backup.
The initial database is empty and migrations run before web/worker/Beat/frontend.
Import business data later through the encrypted exchange CLI/API; never place the
exchange package or its token inside this release. All services set
`pull_policy: never`, so installation cannot silently contact a registry.