Web Services
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.
Supported sources
Section titled “Supported sources”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.
Build process
Section titled “Build process”When deploying from Git:
- The configured branch is cloned.
- A container image is built using your
Dockerfile, or with a buildpack auto-detected from the repository. - The image is pushed to the internal registry.
- 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.
Configuration
Section titled “Configuration”| Field | Description |
|---|---|
build_command | Optional command run before image build (used by buildpacks). |
start_command | Process command, when not using Dockerfile CMD. |
pre_deploy_command | Command run after build, before traffic is shifted (e.g. db migrate). |
port | Application port. Default 8080. |
health_check_path | HTTP path that returns 200 when the service is ready. |
dockerfile_path | Custom path to the Dockerfile (default ./Dockerfile). |
root_directory | Sub-folder used as the project root (for monorepos). |
Deployments
Section titled “Deployments”Trigger a deployment
Section titled “Trigger a deployment”POST /api/web-services/{web_service_id}/deploymentsContent-Type: application/json
{ "branch": "main"}The branch field is optional — defaults to the service’s configured branch.
Cancel a running deployment
Section titled “Cancel a running deployment”POST /api/web-services/{web_service_id}/deployments/{deployment_id}/cancelRoll back to a previous deployment
Section titled “Roll back to a previous deployment”POST /api/web-services/{web_service_id}/deployments/{deployment_id}/rollbackStream build logs
Section titled “Stream build logs”WS /api/web-services/{web_service_id}/deployments/{deployment_id}/logs/streamLifecycle
Section titled “Lifecycle”| Operation | Endpoint |
|---|---|
| Start | POST /api/web-services/{id}/start |
| Stop | POST /api/web-services/{id}/stop |
| Restart | POST /api/web-services/{id}/restart |
| Status | GET /api/web-services/{id}/status |
A stopped service releases compute resources. Persistent disks and environment variables are preserved.
Resources
Section titled “Resources”| Field | Range | Default |
|---|---|---|
cpu_limit | 0.1–2.0 cores | 0.5 |
memory_limit_mb | 64–1024 MB | 256 |
disk_size_gb | 1–1000 GB | (disk disabled) |
Autoscaling
Section titled “Autoscaling”Configure horizontal autoscaling per service:
| Field | Description |
|---|---|
min_instances | Minimum number of running instances. |
max_instances | Maximum 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.
Sleep on idle
Section titled “Sleep on idle”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.
Persistent disk
Section titled “Persistent disk”Optionally attach a persistent disk to your service. The disk survives restarts and redeploys.
| Field | Description |
|---|---|
disk_enabled | Toggle persistent storage on the service. |
disk_size_gb | Disk size in GB. |
disk_mount_path | Mount path inside the container. |
Environment variables
Section titled “Environment variables”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| Parameter | Type | Default | Description |
|---|---|---|---|
tail | int | 100 | Number of log lines (1–10000). |
since | int | — | Unix timestamp to filter logs from. |
Stream logs in real time
Section titled “Stream logs in real time”WS /api/web-services/{web_service_id}/logs/streamURLs and custom domains
Section titled “URLs and custom domains”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.
Shell access
Section titled “Shell access”Open an interactive terminal into a running container directly from the dashboard. See Shell Access.
Metrics
Section titled “Metrics”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.