Shipfox
Reference

Runner Provisioner Configuration Reference

Every Shipfox runner provisioner environment variable with its default, plus the runner template file schema: labels, image, cpu, memory, and max_concurrency.

This page is the canonical reference for configuring the Docker runner provisioner (@shipfox/provisioner-docker). For how a provisioner works, see Runner Provisioners; for starting one, see Run a provisioner.

Required variables

VariablePurpose
SHIPFOX_API_URLBase URL of the Shipfox API the provisioner connects to.
SHIPFOX_PROVISIONER_TOKENLong-lived token that authenticates control-plane calls. Create it for the provisioner scope you intend to run and keep it secret. The value is shown once and can be revoked.
SHIPFOX_PROVISIONER_TEMPLATES_FILEPath to the YAML file describing the runner templates this provisioner can start.

Optional variables

VariableDefaultPurpose
SHIPFOX_RUNNER_API_URLSHIPFOX_API_URLBase URL injected into runner containers as their SHIPFOX_API_URL. Set it when containers reach the API through a different address than the provisioner uses.
SHIPFOX_RUNNER_POLL_MAX_DURATION_MS300000Injected into each runner as SHIPFOX_POLL_MAX_DURATION_MS: how long a started runner polls for a job before exiting. Use 0 to poll forever.
SHIPFOX_PROVISIONER_DOCKER_HOSTlocal socketDocker daemon host. Set a Docker host URL when the daemon is remote.
SHIPFOX_PROVISIONER_DOCKER_NETWORKunsetDocker network attached to runner containers, for reaching the API through a Compose or bridge network.
SHIPFOX_PROVISIONER_DOCKER_EXTRA_HOSTSunsetComma-separated host mappings added to runner containers, such as host.docker.internal:host-gateway.
SHIPFOX_PROVISIONER_POLL_WAIT_SECONDS30How long each demand poll waits for work before returning. 0 makes the poll non-blocking.
SHIPFOX_PROVISIONER_POLL_INTERVAL_MS1000Wait between demand polls. Backs off toward the max after errors.
SHIPFOX_PROVISIONER_POLL_MAX_INTERVAL_MS5000Largest poll backoff interval after repeated errors.
SHIPFOX_PROVISIONER_MAX_RESERVATIONS250Most reservations requested in one poll. Also bounded by free template capacity and the API's cap of 1000.
SHIPFOX_PROVISIONER_RUNNER_INSTANCE_BATCH_SIZE250Runner instances created per request (1–1000). Must not exceed the API's own batch limit.
SHIPFOX_PROVISIONER_REGISTRATION_DEADLINE_MS120000How long a created container may stay unstarted before the provisioner reaps it as stale.
SHIPFOX_RUNNER_MAX_LIFETIME_SECONDS3600Hard maximum lifetime injected into each runner. Set it above the longest permitted job so a runner terminates if its provisioner is unavailable.

Template file schema

The templates file maps label sets to the containers that provide them:

templates:
  docker-ubuntu22-2vcpu:
    labels: [ubuntu22, ubuntu22-2vcpu]
    image: shipfox-runner:ubuntu22
    cpu: 2
    memory: 4GiB
    max_concurrency: 100
FieldTypeDescription
labelsstring[]Labels the started runner registers with. A template can serve any job whose required labels are all in this list.
imagestringContainer image to start.
cpunumbervCPUs allocated to the container. Also the template's selection cost.
memorystringMemory allocation, such as 4GiB.
max_concurrencynumberCap on live containers started from this template.
target_concurrencynumberEnrolled, unassigned runners to keep ready without demand. Defaults to 0. Keep it at or below max_concurrency: the provisioner does not currently reject a template where it is higher.

Template selection: when several templates satisfy a job's labels, the provisioner picks the cheapest (fewest vCPUs), then the most specific.

Was this page helpful?
Edit this page on GitHub

On this page