kamal deploy
Build and deploy your app to all servers. By default it will build the currently checked out version of the app.
Kamal will use the Traefik proxy to seamlessly move requests from the old version of the app to new without downtime.
The deployment process is:
- Login into the Docker registry locally and on all servers
- Build the app image, push it to the registry and pull it onto the servers
- Ensure Traefik is booted
- Check the image boots on one server
- Detect and stop any stale containers
- Boot the new container and stop the old one
- Prune old containers and images
Usage:
kamal deploy
Options:
-P, [--skip-push] # Skip image build and push
# Default: false
-v, [--verbose], [--no-verbose], [--skip-verbose] # Detailed logging
-q, [--quiet], [--no-quiet], [--skip-quiet] # Minimal logging
[--version=VERSION] # Run commands against a specific app version
-p, [--primary], [--no-primary], [--skip-primary] # Run commands only on primary host instead of all
-h, [--hosts=HOSTS] # Run commands on these hosts instead of all (separate by comma, supports wildcards with *)
-r, [--roles=ROLES] # Run commands on these roles instead of all (separate by comma, supports wildcards with *)
-c, [--config-file=CONFIG_FILE] # Path to config file
# Default: config/deploy.yml
-d, [--destination=DESTINATION] # Specify destination to be used for config file (staging -> deploy.staging.yml)
-H, [--skip-hooks] # Don't run hooks
# Default: false