16 Commits

Author SHA1 Message Date
Javi Martín
d8d4c1e9a4 Use systemd to start and monitor puma
Puma 4 is no longer maintained, and Puma 5 removed the option to run
Puma as as daemon. That means that, in order to upgrade, we need to rely
in a process monitoring tool. We're using systemd because it's installed
by default in most (all?) operating systems running Consul Democracy on
production and it's supported by both Puma and the capistrano3-puma gem.

Using systemd means Puma will be automatically started whenever it
crashes, so we no longer need the changes done in commit 40b3c9f2c and
we can now use the default tasks configuration in capistrano3-puma and
capistrano3-delayed-job.

Since Puma is also started automatically when booting the system, we
don't need a cron job to do so anymore and can remove it from the
`schedule.rb` file.
2023-10-24 23:00:12 +02:00
Javi Martín
daf960add4 Run npm:install when deploying with Capistrano 2023-10-17 13:12:20 +02:00
Javi Martín
8942e9baf8 Configure Capistrano to use Puma as a daemon
Since Puma 5.x will remove support for running Puma as a daemon,
capistrano-puma requires defining whether we want to run Puma as a
daemon (as we've been doing so far with Puma 4.x) or to uses systemd.

We'll change this code to uses systemd when upgrading to Puma 5.x.
2021-08-11 02:36:41 +02:00
Javi Martín
755bc8e88a Restart the application on deploy:restart
The task `deploy:restart` was doing nothing since we moved from unicorn
to puma.

Now we're also restarting delayed jobs on `deploy:restart`, which is
probably what's expected in most cases.
2019-11-17 22:55:42 +01:00
Javi Martín
b36e659f4e Use puma instead of unicorn
Puma is the server we use in the development environment, so this way we
don't need to maintain two servers. Furthermore, puma seems to offer a
few advantages over unicorn (like multithreading) and no disadvantages.
2019-10-12 16:50:49 +02:00
Julian Herrero
6d281affa5 Use double quotes 2019-03-15 10:29:07 +01:00
Juanjo Bazán
2d3e3586d1 updates capistrano scm config 2017-03-14 13:30:31 +01:00
rgarcia
a1095089af configures up to date capistrano rvm gem 2016-11-21 10:15:34 +01:00
Juanjo Bazán
631dd50856 updates deprecated require in Capfile 2016-07-11 14:21:41 +02:00
kikito
05bfaa5c30 move whenever require to Capfile 2015-09-12 08:56:47 +02:00
rgarcia
6e16bc7bc3 uses capistrano assets standard task 2015-09-06 17:02:52 +02:00
rgarcia
ebddcfa1d0 cleans up delayed_jobs for capistrano 2015-09-04 00:27:14 +02:00
Manuel Maldonado
4b501ee46b Capistrano recipe 2015-08-12 01:36:42 +02:00
Juanjo Bazán
60a9fad9c1 adds passenger to deploy config 2015-08-07 12:23:33 +02:00
Juanjo Bazán
8a8ca834ba adds capistrano-rvm
sets ruby version for deploy to 2.2.2
2015-08-07 12:21:03 +02:00
Juanjo Bazán
808f0fcfbb adds capistrano's deploy configuration and scripts 2015-08-07 12:17:18 +02:00