fly.io-rails 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fly.io-rails/version.rb +1 -1
- data/lib/generators/templates/fly.rake.erb +15 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8d60c6db390b5838284d1b7d84c04ba0a5a88efaa5a985e3e7971af5972ca55
|
4
|
+
data.tar.gz: a0b302849a8f70507bed5e4b48754a4571975f8e692b1fd5df387c06823c13b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c6d1a988cf366241ec6967a924fed34fb6131c1750a975117efe619074b45a52ea5e5e93ab80eb45fc7b5e4301888ced6ba975faf1cfbd4e85006e4a271ba01
|
7
|
+
data.tar.gz: 4c8bdbf5f08518d0d5e6f97496cdd81170691db7218684245041d71554b288b94815f44c8c8a6e474319e2516b144425d61f9e2cba36957186dcf19e53e82a86
|
data/lib/fly.io-rails/version.rb
CHANGED
@@ -17,7 +17,21 @@ namespace :fly do
|
|
17
17
|
# - full access to secrets, databases
|
18
18
|
# - failures here result in VM being stated, shutdown, and rolled back
|
19
19
|
# to last successful deploy (if any).
|
20
|
-
task :server do
|
20
|
+
task :server => :swapfile do
|
21
21
|
sh 'bin/rails server'
|
22
22
|
end
|
23
|
+
|
24
|
+
# optional SWAPFILE task:
|
25
|
+
# - adjust fallocate size as needed
|
26
|
+
# - performance critical applications should scale memory to the
|
27
|
+
# point where swap is rarely used. 'fly scale help' for details.
|
28
|
+
# - disable by removing dependency on the :server task, thus:
|
29
|
+
# task :server do
|
30
|
+
task :swapfile do
|
31
|
+
sh 'fallocate -l 512M /swapfile'
|
32
|
+
sh 'chmod 0600 /swapfile'
|
33
|
+
sh 'mkswap /swapfile'
|
34
|
+
sh 'echo 10 > /proc/sys/vm/swappiness'
|
35
|
+
sh 'swapon /swapfile'
|
36
|
+
end
|
23
37
|
end
|