CORP production deployment
Production is deployed from the current master commit in the Gitea repository
Robotail/Corp. The Gitea Actions runner only opens a restricted SSH connection;
all validation, backup, build, migration, restart, health checks, and rollback are
performed on the CORP server.
Bootstrap
-
Generate a dedicated Ed25519 key pair for the runner. Never commit the private key.
-
Copy the public key to the CORP server and install the restricted command:
sudo /srv/eusrr/ops/deploy/install-corp-runner-access /tmp/eusrr-gitea-runner.pub -
Add the private key as the
CORP_DEPLOY_SSH_KEYrepository Actions secret in Gitea. -
Run Deploy production manually from the
masterbranch and verify the result before enabling automatic runs on pushes tomaster.
The installer grants the deploy account no general root shell. The runner key
is forced through /usr/local/sbin/eusrr-deploy-ssh, and the deployment command
rejects every revision except the current origin/master SHA.
PostgreSQL snapshots are stored in /var/backups/eusrr/deploy for 14 days. The
last successful revision is recorded in
/var/lib/eusrr-deploy/last-successful-sha, and deployment output is appended to
/var/log/eusrr-deploy.log.