Releases: basecamp/kamal
v1.5.1
v1.5.0
What's Changed
- Added -y option to kamal traefik reboot command by @igor-alexandrov in #730
- Always send the clear env to the container by @djmb in #732
- Fix accessory name checking that is passing to command
kamal accessory
by @latyshev in #502 - Add tip how to apply changes to traefik by "traefik reboot" by @morgoth in #736
- Build from a git archive by @djmb in #700
- Label containers with empty destinations by @djmb in #745
- Added destination to the lock directory by @igor-alexandrov in #741
- Use default verbosity for hooks by @djmb in #752
- Set env variables when running kamal app exec by @djmb in #751
- Latest by tag by @djmb in #748
- Include error message on failure by @djmb in #753
- Make the sample docker setup hook executable by @djmb in #757
- Allow capital letters to match valid service name, such as in MyApp by @ttilberg in #770
- don't escape non-ascii characters in docker env file by @xiaohui-zhangxh in #773
- Take accessory hosts into account for --hosts by @aishek in #772
New Contributors
- @latyshev made their first contribution in #502
- @morgoth made their first contribution in #736
- @ttilberg made their first contribution in #770
Full Changelog: v1.4.0...v1.5.0
v1.4.0
What's Changed
- Allow local builds using a different arch than native by @dhh in #640
- Supports Passing SSH Agent Socket to Build Options by @rience in #434
- Allow for Custom Accessory Service Name by @rience in #506
- Accessory CLI respects
--hosts
by @nicklozon in #608 - require missing net/scp dependency by @juan-apa in #645
- Bump default Traefik image to 2.10 by @igor-alexandrov in #680
- Config the number of containers to keep by @djmb in #650
- Mention Sprockets config in deploy template by @aishek in #627
- Add a simple validation to the service name to prevent setup issues by @nickhammond in #692
- Ensure
kamal remove
completes without setup by @djmb in #706 - Escape the docker registry username and password by @djmb in #704
- Replace `service` by 'service' so it doesn't get executed by bash by @dorianmariecom in #696
- Ensure a minimum limit of 1 for % boot strategy by @djmb in #707
- Remove warning for valid service name by @nickhammond in #708
- Add --skip_push option to setup by @GeNiuS69 in #558
- Add docker-setup hook by @tsvallender in #585
- Role specific logging configuration by @nicklozon in #593
- Install docker with curl or wget by @djmb in #710
- Allow lines option to be configured when following app logs by @alhafoudh in #634
- Informative message on lock error by @DanielJackson-Oslo in #656
- Pass around Roles instead of Strings by @djmb in #715
New Contributors
- @nicklozon made their first contribution in #608
- @juan-apa made their first contribution in #645
- @aishek made their first contribution in #627
- @dorianmariecom made their first contribution in #696
- @GeNiuS69 made their first contribution in #558
- @alhafoudh made their first contribution in #634
- @DanielJackson-Oslo made their first contribution in #656
Full Changelog: v1.3.1...v1.4.0
v1.3.1
What's Changed
- Fix duplicate role env vars by @mdkent in #598
- Rails 7.2 compatible Rubies by @djmb in #638
- Add a missing base64 require by @mdkent in #635
- Fix Net::SSH::HostKeyMismatch between bin/test runs by @mdkent in #636
- Be a bit more patient during tests by @mdkent in #637
Full Changelog: v1.3.0...v1.3.1
v1.3.0
What's Changed
- Allow Kamal to run without traefik by @yoelcabo in #580
- feature: add NAME=all option for accessory reboot by @dmitrytrager in #550
- Fix duplicate error message in pre-build.sample by @rmacklin in #523
- Error out when roles or host filters don't match anything by @mdkent in #595
- Try to match primary_role when roles are filtered by @mdkent in #594
- Add option to set an absolute directory path by @leonvogt in #507
New Contributors
- @yoelcabo made their first contribution in #580
- @dmitrytrager made their first contribution in #550
- @rmacklin made their first contribution in #523
Full Changelog: v1.2.0...v1.3.0
v1.2.0
What's Changed
- Configurable SSH port by @leonvogt in #508
- Return a 502 when container is down by @djmb in #564
- Support customizing the primary_web_role by @mdkent in #577
- Enable yaml aliases by @mdkent in #578
- Add allow_empty_roles to control aborting on roles with no hosts. by @mdkent in #582
- Add wildcards to roles and hosts filters by @mdkent in #583
- Pre and post Traefik reboot hooks by @djmb in #573
New Contributors
Full Changelog: v1.1.0...v1.2.0
v1.1.0
What's Changed
- Pass KAMAL_VERSION env var to container run by @clintmiller in #477
- Loosen superuser check to match docker-installs script check by @npezza93 in #479
- App exec with env file by @djmb in #498
- Remove the env check by @djmb in #499
- Optionally Skip Push for "envify" by @rience in #501
- Require sshkit within the sshkit util by @nickhammond in #544
- Enable trim mode with ERB by @nickhammond in #547
- Reset the env before pushing by @djmb in #557
New Contributors
- @clintmiller made their first contribution in #477
- @npezza93 made their first contribution in #479
Full Changelog: v1.0.0...v1.1.0
v1.0.0
What's changed
- Asset bridging by @djmb in #449 and #467
- Copy env files to remote hosts by @djmb in #438
- Add a require_destination setting by @djmb in #451
- Configurable Healthcheck Expose Port by @rience in #443
- Configurable Kamal directory by @djmb in #437
- Configurable Number of Lines in Healthcheck Log Output by @rience in #444
- Zero downtime deployment with cord file by @djmb in #439
- Fix: do not hardcode Net::SSH auth_methods by @gf3 in #440
- Fix: Prune healthcheck containers by @djmb in #425
- Fix: Stop stale containers when deploying by @djmb in #450
- Fix: Connect to remote host before creating builder by @djmb in #452
- Fix: Validate the build image by @djmb in #456
- Fix: Run interactive commands with the correct host by @djmb in #476
Full changelog: v0.16.1...v1.0.0
ππ
Upgrading to 1.0
There are some significant changes in v1.0 of Kamal. You should test out the upgrade in a non-production environment first.
Upgrade steps
- First push your env files to the hosts, either with:
kamal envify [-d destination]
- Or if you manage .env files yourself,
kamal env push [-d destination]
- You should then reboot traefik and any accessories to pick up the new env files.
- Then you can deploy your app
ENV files
Environment variables are now passed to the Docker containers via ENV files. The files are written to the hosts by the kamal env push
command. This allows more control of when environment variables are changed and means that someone can run commands without needing to set up the environment locally.
Shell expansion no longer works with environment variables because they are no longer passed to docker run
as command line arguments.
Run directory
Files are stored under in .kamal
on the hosts. Existing lock and audit files are not migrated. You can configure this with the run_directory
setting.
Zero-downtime deployments
To prevent Traefik from sending requests to a container that is shutting down, it needs to see the container as unhealthy before we call docker stop
. We do this via a "cord". This is a file in a volume mounted into /tmp/kamal-cord
in the container. The healthcheck is re-written to also check for the file.
To mark a container as unhealthy we delete the file or "cut the cord". The healthcheck will fail, Traefik will stop sending requests and then we can shut down the container safely. You can change the directory the cord will be stored in with:
healthcheck:
cord: /var/run/kamal/cord
Or set it to false
to disable the cord. However, this will remove the zero-downtime guarantee.
Assets
During a deployment you may get requests for old JS/CSS going to the new container and visa versa. To prevent 404s, tell Kamal where the those assets are stored in the container. Kamal will mount a volume containing both old and new files into that location.
asset_path: /rails/public/assets
External image verification
If you pull your own images (using kamal deploy --skip_push
), they now need to be tagged with a label service=<app name>
. This is so we find them when pruning old images.
v0.16.1
What's Changed
- Fix picking the first available role on primary_host by @tbuehlmann in #428
- Fix require ActiveSupport module to provide String#remove by @fig in #422
- Allow Traefik to run without publishing port by @tsvallender in #368
New Contributors
- @northeastprince made their first contribution in #426
- @fig made their first contribution in #422
- @tsvallender made their first contribution in #368
Full Changelog: v0.16.0...v0.16.1
v0.16.0
What's Changed
Due to a trademark claim, we've renamed the project to Kamal after the ancient Arab navigational tool. The new executable is now kamal
and all env variables are prefixed with KAMAL_*
. The new website going forward will live at https://kamal-deploy.org.
- Rename project to Kamal by @dhh in #423
- Log uncommitted changes during deploy by @igor-alexandrov in #396
- Include role options when executing commands by @brunoprietog in #389
- Manage SSH connection starts by @djmb in #399
- Removed validation for remote and local builder params by @igor-alexandrov in #415
- Don't hide Traefik errors by @djmb in #414
- Extract versions that contains dashes by @djmb in #413
- Configurable log levels by @djmb in #418
- Fix builder registry cache when using default registry by @manastyretskyi in #417
Full Changelog: v0.15.1...v0.16.0