All pages

Build and deploy

Services

Available

A service is one thing that runs: a website, an API, a background worker.

A service is built and deployed on its own, so releasing the API does not restart the website.

Types

TypeWhat it doesPort
Web ServiceServes HTTP to the internet, through a domain.Required
Private ServiceReachable only from its environment's network.Required
Background WorkerRuns without taking requests.None

Adding a service

Open a project, pick an environment, and choose Add Service. Enter a name, the type, and the port your app listens on. Owners, admins and developers can do this.

This only describes the service. Nothing runs until it is deployed, and its status reads Not deployed until then.

Settings

The Settings tab of a service says where it comes from and how it runs.

SettingMeaning
SourceA ready-made image, or a Git repository with a Dockerfile that RunOne builds. See Deploy from Git.
PortThe port the app listens on inside its container.
Memory, CPULimits for the container. Empty means no limit.
Health checkHow RunOne decides a new version is good: an HTTP path that answers, a port that accepts connections, or a process that stays up.
Redirect HTTP to HTTPSOn by choice. Leave it off behind a CDN that talks plain HTTP to the server.

Each save creates a new revision. If someone else saved while you were editing, RunOne asks you to reload instead of overwriting their change. Saving does not touch what is running; it takes effect with the next deployment.

The definition as JSON

The same settings are one JSON document, which you can edit at the bottom of Settings or send through the API.

{
  "source": { "type": "git", "repo": "[email protected]:acme/web.git", "branch": "main", "dockerfile": "Dockerfile" },
  "build": { "env_file": ".env.production", "secrets": ["NPM_TOKEN"], "ssh": true },
  "runtime": { "port": 3000 },
  "healthcheck": { "type": "http", "path": "/" },
  "resources": { "memory_mb": 1024, "cpus": 1 },
  "network": { "redirect_https": true }
}

Status

A service has a desired state, Running or Stopped: what you asked for. What is actually happening is reported by the server, so the dashboard never shows a wish as a fact.

StatusMeaning
Not deployedIt has never been deployed.
Starting, StoppingThe server is carrying out what you asked.
Running, StoppedAs asked.
CrashedIt keeps exiting. After 5 restarts in 5 minutes RunOne stops restarting it and opens an incident; Start tries again.
MissingIt should be running, and its server reports no container for it. Deploy it again.
UnknownIts server has not reported lately.

Restart, stop, start

The buttons at the top of a service act on what is running, without creating a deployment. Stop keeps the service and its history; Start runs the last active deployment again.