Skip to content

Web Services

Available

Web Services are the core deployment unit for any long-running application — APIs, full-stack apps, background workers fronted by HTTP, anything that needs a process and CPU/RAM.

Connect a Git repository or point at a Docker image, and Runsite Platform builds, deploys and serves the result on a global edge network. Each service gets a default URL on the runsite.app domain and can serve any custom domain you attach.

Deploy from Git or from a pre-built Docker image:

  • GitHub
  • GitLab
  • Bitbucket
  • Any registry-hosted Docker image (public or private)

Connect Git providers in Settings → Git providers.

When deploying from Git:

  1. The configured branch is cloned.
  2. A container image is built using your Dockerfile, or with a buildpack auto-detected from the repository.
  3. The image is pushed to the internal registry.
  4. The service is rolled out with zero-downtime — the old version is kept until the new one passes health checks.

You can stream the build log live from the dashboard or over WebSocket.

FieldDescription
build_commandOptional command run before image build (used by buildpacks).
start_commandProcess command, when not using Dockerfile CMD.
pre_deploy_commandCommand run after build, before traffic is shifted (e.g. db migrate).
portApplication port. Default 8080.
health_check_pathHTTP path that returns 200 when the service is ready.
dockerfile_pathCustom path to the Dockerfile (default ./Dockerfile).
root_directorySub-folder used as the project root (for monorepos).
POST /api/web-services/{web_service_id}/deployments
Content-Type: application/json
{
"branch": "main"
}

The branch field is optional — defaults to the service’s configured branch.

POST /api/web-services/{web_service_id}/deployments/{deployment_id}/cancel
POST /api/web-services/{web_service_id}/deployments/{deployment_id}/rollback
WS /api/web-services/{web_service_id}/deployments/{deployment_id}/logs/stream
OperationEndpoint
StartPOST /api/web-services/{id}/start
StopPOST /api/web-services/{id}/stop
RestartPOST /api/web-services/{id}/restart
StatusGET /api/web-services/{id}/status

A stopped service releases compute resources. Persistent disks and environment variables are preserved.

FieldRangeDefault
cpu_limit0.1–2.0 cores0.5
memory_limit_mb64–1024 MB256
disk_size_gb1–1000 GB(disk disabled)

Configure horizontal autoscaling per service:

FieldDescription
min_instancesMinimum number of running instances.
max_instancesMaximum instances during scale-up.

Runsite scales the service horizontally based on CPU and memory utilization. While idle services run at min_instances, traffic spikes scale up to max_instances automatically.

Services can be configured to sleep when there is no incoming traffic for a configured period. The next request wakes the service back up — typically in under a second. This is ideal for low-traffic services and preview environments.

Sleep is detected from inactivity at the request layer and is fully transparent to clients.

Optionally attach a persistent disk to your service. The disk survives restarts and redeploys.

FieldDescription
disk_enabledToggle persistent storage on the service.
disk_size_gbDisk size in GB.
disk_mount_pathMount path inside the container.

Manage environment variables in the service settings. They are encrypted at rest and injected at runtime. Changes apply on the next restart or deploy.

See Public API — Environment Variables for API details.

GET /api/web-services/{web_service_id}/logs?tail=100&since=1710000000
ParameterTypeDefaultDescription
tailint100Number of log lines (1–10000).
sinceintUnix timestamp to filter logs from.
WS /api/web-services/{web_service_id}/logs/stream

Each service is reachable at https://<service-name>.runsite.app. If the requested name is already taken, Runsite appends a short numeric suffix (my-api-2.runsite.app). Some subdomains — docs, api, app, auth, status — are reserved by the platform.

Attach as many custom domains as you like. See Custom Domains for the full DNS setup.

Open an interactive terminal into a running container directly from the dashboard. See Shell Access.

Live CPU, memory and request metrics for every service. See Metrics & Logs.

Front-end only?

If your project is a static front-end (React SPA, Astro, Hugo, plain HTML), use Static Sites instead — it is simpler, served from the edge, and always-on.