init
This commit is contained in:
+6
-3
@@ -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
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user