This commit is contained in:
hashbro
2026-08-08 05:00:54 +08:00
parent 6447081ed9
commit 91196b8832
7 changed files with 141 additions and 11 deletions
+6 -3
View File
@@ -37,15 +37,18 @@ The service reads:
- `BUILD_API_HOST` / `BUILD_API_PORT`: defaults to `127.0.0.1:8081`.
- `BUILD_API_TIMEOUT`: synchronous build timeout in seconds, default `900`.
Install API dependencies, then run from the repository root:
Install API dependencies, then run from the repository root. On panel hosts
(宝塔), put variables in a project-root `.env` (see `.env.example`);
`python -m build_api` loads it automatically when the process environment does
not already define them. Optional: `BUILD_API_ENV_FILE=/path/to/file`.
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export BUILD_API_TOKEN="$(python3 -c 'import secrets; print(secrets.token_urlsafe(48))')"
export BUILD_API_ARTIFACT_ROOT=/srv/coruna-artifacts
cp .env.example .env
# edit .env — at least set BUILD_API_TOKEN
python3 -m build_api
```