Secrets
Use ckey v2 and enter values by prompt or stdin, keeping them out of shell history. Changing env alone doesn't recreate the container; run a new deploy with --force when you need to apply the change.
FROM CODE TO BUILD AND DEPLOY
Use your repository and a Dockerfile. Runner fetches the code, builds the image and deploys it on the same Linux server with Docker. The main path below needs no external worker and no pushing the app image to a registry.
01 /
Read the script before running it with sudo. Use the official install command on the server that will host your apps.
curl -sL https://get.runnerci.com/init.sh | sudo bash02 /
In your app's checkout, use the wizard to generate .deploy.yml with a Dockerfile build. Review the file and commit it to the branch Runner will track. The example is for an app on port 3000 whose GET /health returns 2xx; adjust the fields to your app.
Generate in the web wizard ↗runner wizard --path . --out ./.deploy.ymlproject: my-app
system: api
type: docker-build
build:
context: .
dockerfile: Dockerfile
port: 3000
healthcheck:
mode: http
path: /health
version:
source: git-commit
instances:
production:
source:
type: branch
branch: main
keep_versions: 3The manifest and the Dockerfile must be in the repository before you register. Configure credentials if the repo is private. Use an unused project and replace my-org/my-app and main with your repo and branch; adjust the commands if you change project.
03 /
On the target server, register the repository and make the first deploy. Runner fetches the code, runs the Dockerfile locally, starts the container and checks the healthcheck.
runner add --repo my-org/my-app --branch main --ckey v2
runner deploy my-app
runner status my-appCheck the build in the logs and the container running with health healthy. This example publishes no host port and configures no domain; prepare Traefik, DNS and the domain in the manifest for public access.
04 /
In the crontab of the user that operates Runner on the server (root in the default install), check whether the entry below already exists. Add it once if it's missing and make sure the cron service is running. You don't need to trigger each deploy from the terminal.
*/5 * * * * /usr/local/bin/runner fetch --deployWith the default schedule active, Runner checks the source every five minutes. Since the example uses git-commit, every new commit on main becomes a new version and triggers the pipeline automatically on the next detection.
Save this manifest as deploy.yml. image holds the repository without a tag; track picks 2-alpine. poll: false keeps this exercise manual. Caddy answers on / at internal port 80, not exposed on the host.
project: my-app
system: front
type: front-static
image: caddy
image_mode: prebuilt
port: 80
healthcheck:
mode: http
path: /
instances:
production:
source:
type: registry
track: 2-alpine
poll: false
keep_versions: 3runner add --image caddy --manifest-file ./deploy.yml --ckey v2A public image needs no registry credentials. Use an unused project identity: if my-app already exists, change project and the commands that follow. Registering creates the app's state; the deploy comes next.
The deploy resolves the tag to a digest, pulls the image and waits for the HTTP healthcheck. In status, look for the container running and health healthy. With no domain, this example creates no public route.
runner deploy my-app
runner status my-appExpected result: container running and health healthy. That confirms the container is healthy; configure a domain and Traefik to make your app publicly available.
Use ckey v2 and enter values by prompt or stdin, keeping them out of shell history. Changing env alone doesn't recreate the container; run a new deploy with --force when you need to apply the change.
Prepare DNS and Traefik; declare domain and routing.tls in your app's manifest. The gatekeeper tracks pending domains and delegates the certificate to Traefik.
For code in Git, choose the branch and version source and keep the schedule active. For a prebuilt image, configure tags or track and polling. Set up notifications to follow pipeline results.