Commit Graph

51 Commits

Author SHA1 Message Date
Javi Martín
bc9471b49e Define SMTP configuration in the secrets file
Since SMTP passwords should not be in a file under version control, and
they're usually configured in the production.rb file (which is under
version control), the natural place to configure it is the secrets.yml
file.

Until now we were using the capistrano shared folder, but that's a bit
inconvenient since changes we've done to the production.rb file (like
changing eager_load_paths when we upgraded to Rails 5) won't take effect
after a deployment.
2019-11-11 12:11:20 +01:00
Senén Rodero Rodríguez
15b4ff64f4 Run local census records remove_duplicates rake task during deployment
... and before applying new migrations.
2019-11-08 14:46:45 +01:00
Javi Martín
41d252bf10 Simplify syntax to execute RMV
We use `:rvm` just as we use `:rake` in other places.
2019-10-13 00:31:13 +02:00
Javi Martín
48dd4be851 Use .ruby-version to detect our Ruby version
Travis and Rubocop and rmv1-capistrano3 automatically detect the version
based on the `.ruby-version` file.
2019-10-13 00:31:13 +02:00
Javi Martín
19f8e3ac8e Enable tasks to install Ruby and bundler
We're going to upgrade our ruby version, and we need these tasks.

Note we now get a warning caused by `rvm1:install:ruby` invoking
`deploy:updating`. It doesn't seem to be an issue because we don't add
any hooks to `deploy:updating`, and neither do the rest of the gems we
use.
2019-10-13 00:28:33 +02:00
Javi Martín
f26f8b3c3e Add support for legacy unicorn installations
Old CONSUL nginx configurations will probably have a reference to a
unicorn socket. Making that file a symbolic link to a puma socket makes
it possible for the application to keep working without updating the
nginx configuration file.
2019-10-12 17:01:15 +02:00
Javi Martín
3b79a1a3db Add compatibility between puma and RMV1
Puma was adding commands to `rvm_map_bins`, which meant RMV1 wasn't
using the default value of `rvm1_map_bins`.

Changing the order we use to require `rmv1/capistrano3` and
`capistrano/puma` did not fix the issue.
2019-10-12 16:51:28 +02: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
Javi Martín
488461b8ac Remove consecutive blank lines 2019-09-10 20:02:15 +02:00
Javi Martín
b5b07bccd3 Apply PercentLiteralDelimiters rubocop rule 2019-09-10 20:02:15 +02:00
Javi Martín
d2c075cc93 Add new settings on servers with the db role
This task adds records to the database, so the role `db` is more
appropriate.
2019-06-05 20:23:56 +02:00
Javi Martín
685c96c40d Add capistrano task to deploy and upgrade CONSUL 2019-06-05 20:23:56 +02:00
Javi Martín
e339ed94d1 Add new settings every time we deploy
This way we don't need to add and execute rake tasks every time we add a
new setting.
2019-05-31 19:33:31 +02:00
Julian Nicolas Herrero
d83bf940be Merge pull request #3370 from consul/double_quoutes_everywhere
Change single quotes to double quotes everywhere
2019-03-19 12:20:16 +01:00
Julian Herrero
c9cdc72537 Use double quotes in config/ 2019-03-15 10:29:07 +01:00
Julian Herrero
63182569f4 Keep images uploaded with CKEditor when deploying
Images uploaded with CKEditor go to a folder that was not linked, so
every new deploy with capistrano the reference to those images was
lost.

By linking the directory the references to the images remain after a
new deploy.
2019-03-14 15:57:26 +01:00
voodoorai2000
bebcc3da48 Skip ruby and bundler installations
Ruby and bundler should already be installed in the system

Before we can bring back these commands we need to review them, right now they are raising an interesting exception
2018-09-21 15:31:40 +02:00
voodoorai2000
335cd2b597 Link unicorn and production.rb to capistrano's shared folder 2018-09-21 15:29:57 +02:00
Bertocq
0ecfbfe55c Fix capistrano version lock on deploy.rb script to same on Gemfile 2018-01-07 12:51:42 +01:00
Juanjo Bazán
ab2391b78d adds sitemap updating task to deploy 2017-06-06 12:25:45 +02:00
Juanjo Bazán
29e5cff13f updates capistrano 2017-05-01 12:20:52 +02:00
kikito
1d456b0459 updates capistrano to match the Gemfile 2017-04-04 13:20:45 +02:00
Juanjo Bazán
2d3e3586d1 updates capistrano scm config 2017-03-14 13:30:31 +01:00
rgarcia
d0b0782c46 sets only one server to run delayed jobs 2016-12-28 21:24:56 +01:00
rgarcia
5d6c083f67 updates sitemap daily in all servers 2016-12-04 19:57:10 +01:00
rgarcia
cea90fea47 installs bundler gem for new ruby versions 2016-11-21 10:15:57 +01:00
rgarcia
d24ef1615f cleans up deploy.rb 2016-11-21 10:15:51 +01:00
rgarcia
c8c5b55816 updates ruby version for capistrano 2016-11-21 10:15:44 +01:00
rgarcia
a1095089af configures up to date capistrano rvm gem 2016-11-21 10:15:34 +01:00
Juanjo Bazán
f91385873a updates ruby version in deploy.rb to 2.3.1 2016-07-12 11:21:15 +02:00
Juanjo Bazán
575d9a1998 updates capistrano 2016-07-11 14:21:54 +02:00
kikito
62745136db Fixes capistrano setup mismatch 2016-04-25 15:14:44 +02:00
Juanjo Bazán
b946f31fc7 changes 'participacion' to 'consul' in config 2015-11-23 14:10:46 +01:00
Juanjo Bazán
7a5454da68 updates consul url 2015-11-20 20:09:24 +01:00
Juanjo Bazán
1e0ac137bb removes beta testers functionality 2015-10-29 13:19:00 +01:00
kikito
1e59d3259a removes unnecessary whenever setup 2015-09-12 09:01:16 +02:00
kikito
05bfaa5c30 move whenever require to Capfile 2015-09-12 08:56:47 +02:00
kikito
054f3b94e5 uses -> instead of refer 2015-09-11 17:32:10 +02:00
kikito
44b5ea6018 first try at integrating whenever and capistrano 2015-09-11 14:23:41 +02:00
kikito
1a855b2a90 Fixes error which prevented executing cap -T 2015-09-07 13:03:11 +02:00
rgarcia
554d58b620 comments out custom capistrano asset task 2015-09-06 17:04:25 +02:00
rgarcia
ebddcfa1d0 cleans up delayed_jobs for capistrano 2015-09-04 00:27:14 +02:00
rgarcia
feaf4465f3 adds capistrano tasks and hooks for delayed_jobs 2015-09-03 23:26:28 +02:00
rgarcia
f34bcbc12d adds symbolic link to beta testers after deploy 2015-08-31 22:27:23 +02:00
rgarcia
358f8cc392 symlink beta-testers file after a deploy 2015-08-31 14:03:08 +02:00
David Rodríguez
d9b067e9b2 updates ruby version to 2.2.3 2015-08-26 05:37:26 -03:00
rgarcia
3126200c15 removes tests and revision check before deploy 2015-08-21 19:27:10 +02:00
rgarcia
c39657cf5c fixes capistrano unicorn restart task 2015-08-21 17:06:35 +02:00
Manuel Maldonado
4b501ee46b Capistrano recipe 2015-08-12 01:36:42 +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