muster.json

muster.json

The project config file: services, health checks, deploy order and per-service options.

Overview

muster setup writes muster.json at the project root. muster finds it by walking up from the current folder. A legacy deploy.json is still read when there is no muster.json. Commit it, together with .muster/hooks/.

muster.json
{
  "project": "my-app",
  "version": "1",
  "deploy_order": ["redis", "api", "worker"],
  "services": {
    "redis": {
      "name": "Redis",
      "health": { "enabled": true, "type": "tcp", "port": 6379 }
    },
    "api": {
      "name": "API Server",
      "k8s": { "deployment": "myapp-api", "namespace": "production" },
      "health": { "enabled": true, "type": "http", "endpoint": "/health", "port": 8080, "timeout": 30 },
      "credentials": { "enabled": true, "mode": "session", "required": ["API_KEY"] },
      "strategy": "canary",
      "deploy_timeout": 300
    },
    "worker": {
      "name": "Background Worker",
      "remote": { "enabled": true, "host": "worker.example.com", "user": "deploy", "project_dir": "/opt/my-app" },
      "git_pull": { "enabled": true, "remote": "origin", "branch": "main" }
    }
  }
}

muster validates the file when it loads it; the same checks appear in muster doctor. Service keys may contain hyphens.

Top-level keys

KeyDescription
projectProject name.
versionConfig format version ("1").
servicesObject of services, keyed by service name. The key is also the hook folder name.
deploy_orderArray of service keys, deployed in this order. Every service should appear; doctor flags mismatches.
deploy_phasesOptional. Array of {"services": […]} that reorders a full deploy by phase.
skillsSkills enabled for this project.
envmuster env options: source (muster or dotenv) and default_env. See Env & flags.
cloud.activitySet false to stop reporting deploy activity to Fleet Cloud for this project.

Service keys

KeyDescription
nameDisplay name.
skip_deploytrue leaves the service out of muster deploy (set by setup for services found in files but not in the cluster).
deploy_timeoutSeconds each hook may run (default 120). Exported as MUSTER_DEPLOY_TIMEOUT to every stack.
deploy_modeFree-form value exported to hooks as MUSTER_DEPLOY_MODE.
healthHealth check. See below.
credentialsPrompted secrets. See below.
k8sKubernetes target. See below.
strategyrolling (default), blue-green or canary, or an object. See Rollouts.
remoteRun this service's hooks on another host over SSH. See below.
git_pullRun git pull before the deploy hook. See below.

health

KeyDescription
enabledfalse turns the check off.
typehttp, tcp or command. Tells status, explain and doctor how to probe; the check itself is health.sh.
endpointPath for http checks, e.g. /health.
portPort for http and tcp checks.
commandCommand for command checks.
timeoutSeconds (default: the default_health_timeout setting, 10).

credentials

KeyDescription
enabledTurn prompting on.
modeoff, save (keychain), session (memory) or always (prompt every time).
requiredNames of the values to collect, exported to hooks as MUSTER_CRED_<KEY>.

k8s

KeyDescription
deploymentDeployment name, exported as MUSTER_K8S_DEPLOYMENT.
namespaceNamespace, exported as MUSTER_K8S_NAMESPACE.
serviceThe Service carrying production traffic (rollouts; default: the deployment name).
containerContainer to update and report (default: the first).

remote

KeyDescription
enabledTurn remote deploy on.
hostHost name or IP.
userSSH user.
portSSH port (default 22).
identity_fileSSH key, e.g. ~/.ssh/deploy_key.
project_dirProject folder on the host. Hooks and git pull run here.
authOptional {method: key | password | agent, mode: save | session | always}.
cloudtrue routes this service through the Fleet Cloud relay instead of SSH.

git_pull

KeyDescription
enabledPull before every deploy of this service.
remoteGit remote (default origin).
branchBranch (default main).

Project files

Project layout
your-project/
├── muster.json
├── muster.env.schema.json   (muster env) typed keys and flags
├── .env                     optional, loaded before deploys
├── .musterignore            optional, paths setup should not scan
└── .muster/
    ├── hooks/<service>/     the hook scripts (commit these)
    ├── logs/                deploy logs and history (gitignored)
    ├── pids/                dev stack PID files (gitignored)
    ├── env/                 (muster env) config, encrypted secrets, flags
    └── skills/              project skills

Hook approvals are not in the project: they are stored per machine in ~/.muster/trust/. Global settings live in ~/.muster/settings.json (muster settings).