Configuration
Configure shipctl with a TOML file, environment variables, or flags.
Config file location
shipctl looks for configuration in this order:
- The path passed with
--config ./shipctl.tomlin the current directory~/.config/shipctl/config.toml
Example shipctl.toml
[project]
name = "my-app"
build = "npm run build"
output = "dist"
[env.staging]
target = "k8s://staging-cluster/my-app"
replicas = 1
[env.production]
target = "k8s://prod-cluster/my-app"
replicas = 3
require_approval = true
[healthcheck]
path = "/healthz"
timeout = "30s"
Project settings
| Key | Type | Description |
|---|---|---|
name | string | Project identifier used in releases |
build | string | Command run before every deploy |
output | string | Directory containing build artifacts |
Environments
Each [env.<name>] table defines a deploy target.
target
A URI of the form scheme://host/path. Supported schemes: k8s, ssh, s3.
replicas
Number of instances to run. Defaults to 1.
require_approval
When true, deploys pause for interactive confirmation unless --yes is passed.
Health checks
After a deploy, shipctl polls healthcheck.path until it returns 2xx or timeout elapses. On timeout it exits with code 3.
Environment variables
| Variable | Description |
|---|---|
SHIPCTL_TOKEN | API token for authenticated targets |
SHIPCTL_ENV | Default value for --env |
SHIPCTL_CONFIG | Default value for --config |
NO_COLOR | Disable colored output |
Precedence
Flags override environment variables, which override the config file.
Security: never commit
SHIPCTL_TOKEN to shipctl.toml. Keep it in your CI secret store.