capistrano-atlas 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f11473fb1951b2c9e39088c6662cf4382f687b9e
4
- data.tar.gz: a5a7925e3ade4ecc4242cafd3530d5b056ee3df1
3
+ metadata.gz: 9c885d883e4d3bff0340400bee4201e6bccb10a1
4
+ data.tar.gz: 0e7add1b3f70648cd1e5bde09f83eb1dbe033187
5
5
  SHA512:
6
- metadata.gz: 103c4127f330a0dba22d1d5fece2c893f1739c67d9c391f92c2bda590eeabca550bc21a67dd1bb7b44675041d7f71c7a9c87203a4aa79b42a3b59ed23e9bb095
7
- data.tar.gz: 9deba89040018494ade724bde168706bfbbb4013e01bada86f8c7401c3c8950c5f73010c4c02386e80644a5e46abd63fa5da8e0456d95e792f2b13d4e18de194
6
+ metadata.gz: 0c90b350303309f4cf977d1cfc7ee511dbe603f7eda8ca41458cc97fd25ba61bc90b7c7291dbc26ff41e2a50dc62f1983aac056da34964c9515bc469ab6514a0
7
+ data.tar.gz: 40d7dd8264863b2bad4d1752a6993468741221f271e09cfb0f4e6dc6e0a2efba3a8194ae1009ae53181797cc7b4c22601b7f5ee8e826c0eec8822b01c7f74952
@@ -8,6 +8,7 @@ include Capistrano::Atlas::DSL
8
8
 
9
9
  load File.expand_path("../tasks/provision.rake", __FILE__)
10
10
  load File.expand_path("../tasks/defaults.rake", __FILE__)
11
+ load File.expand_path("../tasks/enable_swap.rake", __FILE__)
11
12
  load File.expand_path("../tasks/user.rake", __FILE__)
12
13
  load File.expand_path("../tasks/aptitude.rake", __FILE__)
13
14
  load File.expand_path("../tasks/ufw.rake", __FILE__)
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Atlas
3
- VERSION = "0.0.2".freeze
3
+ VERSION = "0.0.3".freeze
4
4
  end
5
5
  end
@@ -3,6 +3,7 @@ namespace :load do
3
3
 
4
4
  set :atlas_recipes, %w(
5
5
  aptitude
6
+ enable_swap
6
7
  bundler
7
8
  crontab
8
9
  dotenv
@@ -119,6 +120,7 @@ namespace :load do
119
120
  tmp/sockets
120
121
  public/.well-known
121
122
  public/system
123
+ node_modules
122
124
  )
123
125
  }
124
126
  set :linked_files, -> {
@@ -0,0 +1,24 @@
1
+ atlas_recipe :enable_swap do
2
+ during :provision, "configure"
3
+ end
4
+
5
+ namespace :atlas do
6
+ namespace :enable_swap do
7
+
8
+ desc "Configure swap file"
9
+ task :configure do
10
+ rules = fetch(:atlas_ufw_rules, {})
11
+
12
+ execute "sudo fallocate -l 4G /swapfile"
13
+ execute "sudo chmod 600 /swapfile"
14
+ execute "sudo mkswap /swapfile"
15
+ execute "sudo swapon /swapfile"
16
+ execute "sudo echo \"/swapfile none swap sw 0 0\" > /etc/fstab"
17
+ execute "sudo sysctl vm.swappiness=10"
18
+ execute "sudo echo \"vm.swappiness=10\" > /etc/sysctl.conf"
19
+ execute "sudo sysctl vm.vfs_cache_pressure=50"
20
+ execute "sudo echo \"vm.vfs_cache_pressure = 50\" > /etc/sysctl.conf"
21
+ end
22
+
23
+ end
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-atlas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John McDowall
@@ -119,6 +119,7 @@ files:
119
119
  - lib/capistrano/tasks/crontab.rake
120
120
  - lib/capistrano/tasks/defaults.rake
121
121
  - lib/capistrano/tasks/dotenv.rake
122
+ - lib/capistrano/tasks/enable_swap.rake
122
123
  - lib/capistrano/tasks/logrotate.rake
123
124
  - lib/capistrano/tasks/maintenance.rake
124
125
  - lib/capistrano/tasks/migrate.rake