runtm-worker
Build and deploy worker for Runtm. See the self-hosting docs for deployment setup.
Pipeline
Remote Builder (Default, Recommended)
- Unzip artifact from storage
- Validate manifest against schema
- Create Fly app and allocate IPs
- Run
flyctl deploy(builds AND deploys in one step)- Auto-generates
fly.tomlwith optimized health checks - Builds on Fly's remote builders (fast, no local Docker)
- Deploys to Fly Machine with health check verification
- Auto-generates
- Save provider resource and verify health
- Update deployment status + URL in DB
- Persist logs
Local Build (Fallback)
- Unzip artifact from storage
- Validate manifest against schema
- Build Docker container locally with BuildKit
- Push to Fly.io registry
- Create/update Fly Machine via Machines API
- Poll for health check
- Update deployment status + URL in DB
- Persist logs
Development
# Install dependencies
pip install -e ".[dev]"
# Run worker
python -m runtm_worker.main
# Run tests
pytest
Environment Variables
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Required |
REDIS_URL |
Redis connection string | Required |
FLY_API_TOKEN |
Fly.io API token | Required |
ARTIFACT_STORAGE_PATH |
Local artifact storage path | /artifacts |
ARTIFACT_STORAGE_BACKEND |
Storage backend: local or s3 |
local |
BUCKET_NAME |
S3/Tigris bucket name (when backend=s3) | - |
AWS_ENDPOINT_URL_S3 |
S3 endpoint URL (e.g. https://fly.storage.tigris.dev) |
- |
USE_REMOTE_BUILDER |
Use Fly's remote builder (faster) | true |
Providers
The worker uses a provider interface to support multiple deployment backends:
FlyProvider- Fly.io Machines (default)- Future: Cloud Run, etc.
Note: When using the remote builder (default), most deployment is handled by
flyctl deploy. The FlyProvider is still used for app creation, IP allocation,
machine listing, health verification, and custom domain management.
Release files for runtm-worker 0.2.142
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| runtm_worker-0.2.142.tar.gz | 41.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| runtm_worker-0.2.142-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 81.5 kB
Release files / runtm_worker-0.2.142.tar.gz
| Download URL | runtm_worker-0.2.142.tar.gz |
|---|---|
| Size | 41.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa2390bbd31cb99a4a2abcb6bb5eae245d35d8ab71cb1e0b1c911c408048f8cb
|
|
BLAKE2b-256 checksum How to use checksums |
4f7eed823ee335f8ab5ac411a7a2ba909356c0748db67f86f4482393aa2feae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / runtm_worker-0.2.142-py3-none-any.whl
| Download URL | runtm_worker-0.2.142-py3-none-any.whl |
|---|---|
| Size | 40.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95431fb40c1b38455275bf6e1aae0f678659f73d286cc51600229182791c0876
|
|
BLAKE2b-256 checksum How to use checksums |
7b836d6a7f5b9668c0c6a0a7d893884138ad1399aee57b01595fa0b7a803f70e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|