FROM YOUR SCENARIO TO DEPLOY
What problem do you want to solve?
Pick a scenario, adapt the manifest and check the prerequisites. Names, repositories and domains are examples. Run the commands on the target server, with the runner initialized and Docker available.
01 /
From Git to build and deploy on a VPS
Your API has a Dockerfile, listens on 3000 and returns 2xx on /health. Commit this .deploy.yml to the main branch; replace my-org/my-api with your repo and set up Git credentials if needed. Replace api.example.com with your domain and point your DNS at the server. The server needs Docker and Traefik to serve this route.
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
source:
type: branch
branch: mainrunner add --repo my-org/my-api --branch main --ckey v2
runner deploy my-apiWhat happens
With cron running runner fetch --deploy every five minutes, a git push to main changes the git-commit version: Runner fetches the code, builds locally from the Dockerfile and deploys automatically. No external worker and no pushing the app image to a registry. The candidate passes the healthcheck before traffic is switched. A published port or a shared writable volume may require a downtime window.
02 /
Image from GitHub Actions, no repo on the server
CI builds and pushes an image with a semver tag. Replace the image repository and adapt the port and healthcheck. Save it as deploy.yml. For a private registry, run runner registry login with --password-stdin. Polling is disabled in this example: the Action is the trigger.
project: my-api
system: api
type: api
image: ghcr.io/my-org/my-api
image_mode: prebuilt
port: 3000
healthcheck:
mode: http
path: /health
instances:
production:
source:
type: registry
tags: "v[0-9]*"
poll: falserunner add --image ghcr.io/my-org/my-api --manifest-file ./deploy.yml --ckey v2
runner service init --enable-api
runner service start
runner hook secret my-api- uses: devborlot/runner-deploy-action@v1
with:
url: ${{ secrets.RUNNER_URL }}
app: my-api
secret: ${{ secrets.RUNNER_HOOK_SECRET }}
image-tag: ${{ github.ref_name }}Partial workflow: fill in the event, job, runs-on, and the image build and push. RUNNER_URL is the service's HTTPS URL; github.ref_name must be the published semver tag. The secret lives in the protected file created by hook secret; it is not printed to the terminal.
What happens
Expose the service over HTTPS with runner service expose, adding --hooks-publicos when the Action needs public access. Store the per-app secret in GitHub secrets and run the Action after the image push. The signed hook resolves the tag to a digest and follows the deploy; a re-pushed version tag is rejected. No cloned repository on the target.
03 /
Site or artifact over signed HTTPS
You ship a tar.gz with no Git on the target. The package must contain the Dockerfile and the site files needed to build an image that listens on 80. Replace every URL and the minisign public key: these addresses are illustrative. The manifest lives on the server as deploy.yml.
project: my-site
system: front
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 80
healthcheck:
mode: http
path: /
instances:
production:
source:
type: https
url: https://artefatos.example.com/site.tar.gz
checksum_url: https://artefatos.example.com/site.tar.gz.sha256
signature:
url: https://artefatos.example.com/site.tar.gz.minisig
public_key: REPLACE_WITH_MINISIGN_PUBLIC_KEYrunner add --manifest-file ./deploy.yml --ckey v2
runner deploy my-siteWhat happens
The driver downloads over HTTPS and checks the SHA-256 and minisign signature before extracting and building the image. With no version declared, the artifact revision sets the version. When polling, ETag or Last-Modified detect changes; publish the checksum and signature that match the artifact.
04 /
A container that is already running
The my-api-manual container is running and the my-api app is already registered with the runner (WARM adoption). The registered repo contains this manifest, a Dockerfile and the health endpoint. For COLD adoption, also pass --repo, --branch and --ckey; review envs, secrets, network and persistence before the cutover.
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
source:
type: branch
branch: mainrunner adopt my-api --from-container my-api-manual --corte-pendente
runner deploy my-api --replace-adopted --janela 60 --dados semWhat happens
Adoption captures the envs and keeps the app paused until the assisted cutover. Here --dados sem assumes an app with no persistent data to migrate. The old container becomes __ccs_antes; a failed health check can revert the cutover. Check the result before finalize-adoption; revert-adoption lets you go back. Published ports and volumes may require downtime.
05 /
Existing Compose setup
Run it in the checkout that contains docker-compose.yml. The wizard turns the services you pick into individual manifests; below is an example API with a Dockerfile, not a universal conversion of any Compose file. Review the build paths, networks, volumes, envs, secrets and healthcheck in the result. In the registration below, replace my-org/my-app, main and api with the repository, branch and directory of the generated service. Commit the manifests before registering.
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
source:
type: branch
branch: mainrunner wizard --from-compose
runner add --repo my-org/my-app --branch main --manifest-path api/.deploy.yml --ckey v2What happens
The wizard generates one .deploy.yml per selected service. Repeat the registration for each service, pointing to its manifest inside the repository. Each app has its own deploy: there is no coordinated Compose transaction, nor one across servers. Databases and volumes need their own operations and backups.
06 /
A new domain that doesn't point here yet
Replace api.example.com with your domain and set up Traefik with a compatible ACME resolver. The manifest is committed to the repo already registered as my-api. DNS does not point to the server yet; the runner does not create the DNS record.
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
routing:
tls: auto
source:
type: branch
branch: mainrunner deploy my-api
runner route status my-apiWhat happens
The gatekeeper keeps the domain pending and avoids requesting the certificate too early. Once you fix DNS, later probes can activate the certificate without a new deploy. Issuance is delegated to Traefik's ACME. Check the state with route status.
07 /
Staging and PR previews on the same server
Set up the GitHub repo with this manifest and a parent instance already registered. Configure wildcard DNS for *.preview.example.com and Traefik; check the domain_pattern. gh must be authenticated to detect merged/closed PRs. Replace the repo, branch and PR number with yours.
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
domain_pattern: "pr-${PR_NUMBER}.preview.example.com"
source:
type: branch
branch: main
staging:
source:
type: branch
branch: devrunner add --repo my-org/my-api --pr 42 --branch feat/my-changeWhat happens
The PR gets its own state and inherits envs and secrets from the parent instance. fetch --deploy follows changes; cleanup uses a TTL or cleanup --prs for closed PRs. The staging instance tracks dev; to use it, register the app with --instance staging. Everything runs on the same server, with no multi-node coordination.
08 /
AI prepares; your team reviews the release
An agent helped change code, the Dockerfile or the manifest. The my-api API is already registered, with repo access, domain and Traefik set up and an HTTP healthcheck. Review the changes in Git before running them. The manifest below is a base for an API on port 3000, not an automatic approval of any generated code.
View this scenario's base configuration
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
source:
type: branch
branch: mainrunner validate --app my-api
runner preflight my-api
runner deploy my-api
runner status my-api
runner logs history my-apiWhat happens
Validate checks the manifest; preflight checks prerequisites without starting containers. The deploy fetches the version, builds locally and checks the healthcheck before switching traffic. Status and history let you confirm the result. Your team sets up permissions and approvals in the agent's environment and in Git; Runner does not provide an AI sandbox.
09 /
Two triggers for the same application
Cron and an operator or agent can trigger my-api at the same time. The application is already registered and uses the base manifest. Another deploy is running; you want to wait for it without removing its lock.
View this scenario's base configuration
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
source:
type: branch
branch: mainrunner deploy my-api --wait-lock 120
runner status my-api
runner logs history my-apiWhat happens
The per-application lock prevents overlap on the same host. The run waits up to 120 seconds for the lock; if it is not released in time, don't proceed as if it had deployed. Once it gets the lock, Runner runs the normal version checks. Waiting does not decide which business version should win: coordinate the triggers and check the history. It is not a distributed lock across hosts.
10 /
Going back after a bad release
The my-api API already has a healthy previous version and retained images. The configured healthcheck passed, but you found a functional problem after the deploy. Make sure the current configuration and data are compatible with the previous version before going back.
View this scenario's base configuration
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
source:
type: branch
branch: mainrunner versions my-api
runner rollback my-api
runner status my-api
runner logs history my-apiWhat happens
Runner goes back to the retained previous version, without pushing another image to a registry. If the candidate's own healthcheck fails during the deploy, the flow keeps or restores the previous one depending on the phase. Rollback does not undo databases, volumes or external effects; published ports and shared writable volumes may require downtime.
11 /
Deploy inside the company network
The Linux server with Docker sits on a restricted network. It can reach the private Git host and the base images and dependencies the Dockerfile uses. Set up credentials and trust for the Git host if needed. Your API answers on /health on port 3000. Replace api.example.com with an internal domain and set up the network's DNS and Traefik; remove domain if you don't need a route.
View this scenario's base configuration
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
source:
type: branch
branch: mainrunner add --repo my-org/my-api --branch main --ckey v2
runner preflight my-api
runner deploy my-apiWhat happens
With the manifest committed to the repo, Runner fetches the code and builds on the target server. Set up the cron from the start guide for future versions. This path does not require CI to open SSH into production or the Runner HTTP API to be exposed. The host still needs to reach its sources and dependencies; this is not a promise that it works without connectivity.
12 /
Deploy without copying secrets to CI
The my-api app is already registered with ckey v2. Its secrets bundle was created and committed through the documented flow, and the correct private identity is available on the server. The Dockerfile and base manifest have been reviewed. Don't put secret values in the YAML, in commands or in the agent chat.
View this scenario's base configuration
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
source:
type: branch
branch: mainrunner preflight my-api
runner deploy my-api
runner status my-apiWhat happens
The bundle stores encrypted values in the repository; the private key stays on the server. The deploy materializes the environment the application needs. Decryption errors stop the normal path before the container is replaced. This does not prevent reading by someone with enough access to the host and is not equivalent to Vault, OIDC or corporate RBAC. Plan key custody and recovery; without the keys the bundle may be unrecoverable.
13 /
Understand what happened to a release
The build or deploy of my-api failed, or the external pipeline finished and you don't know which version is running. The app is already registered. Use the base configuration as a reference and start by inspecting before trying another deploy.
View this scenario's base configuration
project: my-api
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
version:
source: git-commit
healthcheck:
mode: http
path: /health
instances:
production:
domain: api.example.com
source:
type: branch
branch: mainrunner status my-api
runner logs history my-api
runner preflight my-apiWhat happens
Status shows the current state; history helps you find versions and results; preflight checks prerequisites such as manifest, secrets, ports and network without starting containers. Use these signals to choose the next diagnostic step. The local history is not distributed tracing or an immutable audit log; record availability depends on your retention.