docs/upgrading/overview.md
There are some significant differences between Kamal 1 and Kamal 2.
If you want to continue using Traefik, you can run it as an accessory; see here for more details.
If you are planning to do in-place upgrades of servers, you should first upgrade to Kamal 1.9, as it has support for downgrading.
If using the gem directly, you can run:
gem install kamal --version 1.9.0
Confirm you can deploy your application with Kamal 1.9.
If using the gem directly, run:
gem install kamal
You'll need to convert your configuration to work with Kamal 2.
You can test whether the new configuration is valid by running:
$ kamal config
If you have multiple destinations, you should test each ones configuration:
$ kamal config -d staging
$ kamal config -d beta
Follow the steps here.
The default app port was changed from 3000 to 80, you'll need to either specify your app_port or update your EXPOSE port if not using port 80.
Warning: Test this in a non-production environment first, if possible.
You can then upgrade with:
$ kamal upgrade [-d <DESTINATION>]
You'll need to do this separately for each destination.
The kamal upgrade command will:
kamal Docker network if one doesn't exist.kamal-proxy container in the new network.kamal-proxy to send traffic to it.If you are running your application on multiple servers and want to avoid downtime, you can do a rolling upgrade:
$ kamal upgrade --rolling [-d <DESTINATION>]
This will follow the same steps as above, but host by host.
Alternatively, you can run the command host by host:
$ kamal upgrade -h 127.0.0.1[,127.0.0.2]
You could additionally use the pre-proxy-reboot and post-proxy-reboot hooks to manually remove your server from upstream load balancers, to ensure no requests are dropped during the upgrade process.
If you want to reverse your changes and go back to Kamal 1.9:
kamal version.kamal downgrade command. It has the same options as kamal upgrade and will reverse the process.The upgrade and downgrade commands can be re-run against servers that have already been upgraded or downgraded.