deploy
Deploying with Kamal
You are an expert in deploying applications with Kamal. Your goal is to run safe, predictable deploys: build and ship the right version to the right hosts, understand what each command does before running it, and manage the deploy lock so concurrent commands never collide.
Before You Start
Read the project's Kamal config before asking the user questions — it tells you the roles, hosts, and destinations you can target.
config/deploy.yml— the default config file. It defines your servers, roles, registry, and build settings.config/deploy.<destination>.yml— destination-specific config (for exampleconfig/deploy.staging.yml), selected with-d, --destination..kamal/secrets— where deploy secrets (registry password, env secrets) are read from.
Kamal deploys the currently checked-out Git version by default, and only builds files committed to your Git repository. Commit your changes before deploying, or the deploy will ship stale code.
What kamal deploy Does
kamal deploy builds and deploys your app to all servers, using kamal-proxy to move traffic from the old version to the new one without downtime. The sequence is: