Build and deploy worker for Runtm
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file runtm_worker-0.1.0.tar.gz.
File metadata
- Download URL: runtm_worker-0.1.0.tar.gz
- Upload date:
- Size: 31.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ee727d1f3099ba7e95258c9246694adc6128350bc03795b1fae1d0a86051562
|
|
| MD5 |
a15fd535f682975c388710c3ec4c3451
|
|
| BLAKE2b-256 |
281f56569c33f6b1902344d2f8ca25abc7d0850c274979cb6a9caf31c2fcd347
|
File details
Details for the file runtm_worker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: runtm_worker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4e7ffd6486f6a6cc2c86e6b83ec195ce1971e60a84a19b92a77542da0410c68
|
|
| MD5 |
508b0b9a4d4aaa7b8f71b97e4441b780
|
|
| BLAKE2b-256 |
cddc9b4927e1693c3b0343bd671eb52a36432da0c6bb8f33fc225fed811db30c
|