fly.io-rails 0.0.18-x86_64-darwin → 0.0.19-x86_64-darwin
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 +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: 99f929098e295f918fa46a37d36caa7080d4c7350f09e98a59921b7f262cfaa2
|
4
|
+
data.tar.gz: 5f786e41cc4413764b9ead3f9a4711026c29f35034a4dd3c2c610f645665a2ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ee1766b0181a00c3753c67ceee5409f745c40fb895e9f4e4e20437e088a0bae92f15ad4586409b6db66fd3cd2bfea682b66c9d7878e9d6ab4e988a301072274
|
7
|
+
data.tar.gz: '0219238590873c56f094ddb223debb58ad4f87f6b901aa5ae509fb8710c6caefa2a2e51050c73afdc75917751e77dea53e87355612863763b92ac8bdb0d60ee0'
|
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
|