CI modelled on Pulse, deploy script with rollback, bootstrap, README
- .gitea/workflows/ci.yml: flake8 + dash check, pytest (90% coverage floor), MariaDB integration tests, bandit, pip-audit, gitleaks, actionlint, shellcheck, zizmor, semgrep; main deploys through a signed webhook and waits for /health to report the commit. - deploy/thor_deploy.sh: deploys an exact sha, installs units and nginx site when changed, rolls back unless /health reports the sha with a working database. Sandbox-tested. - deploy/bootstrap.sh: idempotent first install on CT 173. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eecb24297a
commit
379570bbdc
14 files changed
+689
No files matched your search
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Creates /tmp/venv with Thor's runtime and dev dependencies inside a CI job container
|
||||
# (Debian trixie: Python 3.13, the same as production on CT 173).
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3; do
|
||||
if apt-get -o Acquire::Retries=3 update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 install -y -qq --no-install-recommends \
|
||||
python3 python3-venv python3-pip >/dev/null; then
|
||||
break
|
||||
fi
|
||||
[ "$attempt" = 3 ] && { echo "::error::could not install python3"; exit 1; }
|
||||
echo "apt failed (attempt $attempt); retrying in 10s"
|
||||
sleep 10
|
||||
done
|
||||
python3 -m venv /tmp/venv
|
||||
/tmp/venv/bin/pip install --quiet --disable-pip-version-check -r requirements.txt -r requirements-dev.txt
|
||||
/tmp/venv/bin/python --version
|
||||
Reference in new issue
Block a user