Skip to main content

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)

  1. Unzip artifact from storage
  2. Validate manifest against schema
  3. Create Fly app and allocate IPs
  4. Run flyctl deploy (builds AND deploys in one step)
    • Auto-generates fly.toml with optimized health checks
    • Builds on Fly's remote builders (fast, no local Docker)
    • Deploys to Fly Machine with health check verification
  5. Save provider resource and verify health
  6. Update deployment status + URL in DB
  7. Persist logs

Local Build (Fallback)

  1. Unzip artifact from storage
  2. Validate manifest against schema
  3. Build Docker container locally with BuildKit
  4. Push to Fly.io registry
  5. Create/update Fly Machine via Machines API
  6. Poll for health check
  7. Update deployment status + URL in DB
  8. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runtm_worker-0.2.20.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runtm_worker-0.2.20-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file runtm_worker-0.2.20.tar.gz.

File metadata

  • Download URL: runtm_worker-0.2.20.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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

Hashes for runtm_worker-0.2.20.tar.gz
Algorithm Hash digest
SHA256 8dfb65d80c6dc4d90f4deed298ced5c764ca0bbcd5cb8ddae9aafbbdb8ec35cc
MD5 0542612a6af735702eed6777a1c2269e
BLAKE2b-256 16772fe1d8541a3dbb8ea2ab76d9dbf99d7789dca1d112028d72f7e07e948b0f

See more details on using hashes here.

File details

Details for the file runtm_worker-0.2.20-py3-none-any.whl.

File metadata

  • Download URL: runtm_worker-0.2.20-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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

Hashes for runtm_worker-0.2.20-py3-none-any.whl
Algorithm Hash digest
SHA256 e7c9f30d1e8890e7f91c336d63aeb2eae32d58933388ea673967a17fff603fb9
MD5 a9f9b6da066e31cc89bfe7d2d2f4df8d
BLAKE2b-256 071fdee3ec5837672d18e347cc7f3b52bdc969585b9649e1e73af5d6022bcd72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page