fly.io-rails 0.0.18-x86-linux → 0.0.19-x86-linux
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: 57a76033290a05d6e82ece1a86f2f4c8c816eb2b784353af4ded0a9f2b89a79f
|
4
|
+
data.tar.gz: cb14558e0327e8d22d522927c896b4d1b77be0640cdc91a6ba760999dabd991e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35400f6f3829a605004785570e150c4a4af1ba3d049ae62ed177f9bced1ad8b37c47efd6fff44ad1faa1746f3e18fd3b81cb0e8aab33816ba1ee2c7b285da662
|
7
|
+
data.tar.gz: ff8b70d770664afc93387314202e3285044489a47bf92bcca4a99d7fb41e553f2a027d96e6ae53c9db1afc9f910395e83961db03195f1a29cad5d2bfb8a0b19e
|
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
|