c15t
/
Select a framework
Introduction to Runners
Frameworks
Reference
API Reference
CLI Usage
OSS
Contributing
License
C15T Logo
DocsChangelog
xbskydiscordgithub0
c15t
/
Select a framework
Introduction to Runners
Frameworks
Reference
API Reference
CLI Usage
OSS
Contributing
License
home-2Docs
chevron-rightFrameworks
chevron-rightHttp
chevron-rightDeployment

Deployment

Deploy standalone HTTP API runners to various platforms

Guide to deploying standalone HTTP API runners to production.

Vercel

Setup

  1. Create api/runner.ts:
import { createHttpRunner } from "runners/http";
import * as runners from "../runners";

export default createHttpRunner({
  runners,
  region: process.env.VERCEL_REGION || "us-east-1",
});
  1. Deploy:
vercel deploy

AWS Lambda

Setup

  1. Create handler:
// lambda.ts
import { createHttpRunner } from "runners/http";
import * as runners from "./runners";

export const handler = createHttpRunner({
  runners,
  region: process.env.AWS_REGION || "us-east-1",
});
  1. Package and deploy:
npm run build
zip -r function.zip dist node_modules runners
aws lambda update-function-code --function-name runners --zip-file fileb://function.zip

Docker

Dockerfile

FROM node:18-alpine

WORKDIR /app

# Install Playwright browsers
RUN npx playwright install --with-deps chromium

COPY package*.json ./
RUN npm ci --production

COPY dist ./dist
COPY runners ./runners

EXPOSE 3000

CMD ["node", "dist/server.js"]

Build and Run

docker build -t runners-http .
docker run -p 3000:3000 -e RUNNER_REGION=us-east-1 runners-http

Kubernetes

Deployment YAML

apiVersion: apps/v1
kind: Deployment
metadata:
  name: runners-http
spec:
  replicas: 3
  selector:
    matchLabels:
      app: runners-http
  template:
    metadata:
      labels:
        app: runners-http
    spec:
      containers:
      - name: runners
        image: runners-http:latest
        ports:
        - containerPort: 3000
        env:
        - name: RUNNER_REGION
          value: "us-east-1"
        resources:
          requests:
            memory: "512Mi"
            cpu: "250m"
          limits:
            memory: "2Gi"
            cpu: "1000m"

Environment Variables

VariableDescriptionRequired
RUNNER_REGIONRegion identifierNo (defaults to "us-east-1")
DEBUGEnable debug loggingNo
RUNNERS_DEBUGEnable runner debug loggingNo

Next Steps

  • Check Quickstart for setup guide
Runners brings execution, reliability, and distribution to async TypeScript. Build tests and checks that can run locally, in CI, or distributed across regions with ease.
Product
  • Documentation
  • Components
Company
  • GitHub
  • Contact
Legal
  • Privacy Policy
  • Cookie Policy
runners