205a Capistrano: Opscomplete and Puma

Posted . Visible to the public.

If you want to use Puma as the application server you have the two following options.

  • There is the capistrano-puma gem Show archive.org snapshot . There is no stable support for the latest puma-6 version yet.
  • The capistrano-opscomplete gem Show archive.org snapshot in version 1.1.0 and higher has support to reload your application after deployment. We recommend to use this as it is a simple and performant integration in our setup.

In the second case you just have to add this to your deployment configuration:

after 'deploy:published', 'opscomplete:puma:reload'

In case you make changes to your ENV-Variables you have to restart the service. Here you can use:

after 'deploy:published', 'opscomplete:puma:restart'

or do it one time like:

bundle exec cap staging opscomplete:puma:restart
Stefan Langenmaier
Last edit
Kim Klotz
License
Source code in this card is licensed under the MIT License.
Posted by Stefan Langenmaier to opscomplete (2024-08-23 08:53)