Stasis

Configuration

Configure the CI runner

Configuration

The CI runner is configured through a config.yaml file and environment variables.

Configuration File

The default configuration file is config.yaml in the CI runner directory:

server:
  host: "0.0.0.0"
  port: 8080

executor:
  max_concurrent_jobs: 5
  workspace_root: "/app/workspaces"
  docker:
    socket: "/var/run/docker.sock"
  resources:
    cpu_limit: "2.0"
    memory_limit: "2g"

store:
  store_type: "memory"  # or "redis"
  redis_url: "redis://redis:6379"

artifacts:
  storage_type: "local"  # or "s3"
  local_path: "/app/artifacts"

auth:
  enabled: true
  api_keys:
    - "your-api-key"

Server Configuration

OptionDescriptionDefault
server.hostBind address0.0.0.0
server.portHTTP port8080

Executor Configuration

OptionDescriptionDefault
executor.max_concurrent_jobsMaximum parallel jobs5
executor.workspace_rootWhere repos are cloned/app/workspaces
executor.docker.socketDocker socket path/var/run/docker.sock
executor.resources.cpu_limitCPU limit per job2.0
executor.resources.memory_limitMemory limit per job2g

Store Configuration

The store keeps track of job state and history.

OptionDescriptionDefault
store.store_typememory or redismemory
store.redis_urlRedis connection URLredis://redis:6379
store.max_historyMax jobs to remember100

Use memory for development. For production, use redis so job history persists across restarts.

Artifact Configuration

Build artifacts (compiled binaries, test reports, etc.) can be stored locally or in S3.

OptionDescriptionDefault
artifacts.storage_typelocal or s3local
artifacts.local_pathWhere to store artifacts/app/artifacts
artifacts.s3.endpointS3 endpoint URL-
artifacts.s3.bucketS3 bucket name-
artifacts.s3.regionS3 region-
artifacts.s3.access_keyS3 access key-
artifacts.s3.secret_keyS3 secret key-

Authentication

OptionDescriptionDefault
auth.enabledRequire API keytrue
auth.api_keysList of valid API keys[]

Environment Variables

You can override configuration with environment variables:

CI_RUNNER_PORT=8080
CI_RUNNER_HOST=0.0.0.0
REDIS_URL=redis://redis:6379
RUST_LOG=info

Docker Compose

The recommended Docker Compose setup:

services:
  ci-runner:
    build:
      context: .
      dockerfile: Dockerfile.dev
    volumes:
      - ci-workspaces:/app/workspaces
      - ci-cache:/app/cache
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - RUST_LOG=info
    networks:
      - ci-network

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data

volumes:
  ci-workspaces:
  ci-cache:
  redis_data:

networks:
  ci-network:
    driver: bridge

Next Steps

On this page