fly.io-rails 0.0.18-arm64-darwin → 0.0.19-arm64-darwin
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: 840d8adfe7e5493983b7ac95dde1f35b5fd8fd6fdece36aa069bda5f3fef2f00
|
4
|
+
data.tar.gz: f9ab0d5776cb9f48fe1c6e97405974ab59677917b0605073d126c1fb291ac3d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 891a801fe86a27b8b284ef605276e39fd7445a375c0adce471d73dc03dbec75ec52ed4794321f815359f8db31e71543ed3eb85ba37ef1a453cdb597c52462161
|
7
|
+
data.tar.gz: 389f6f3063bdae204d68c67f06b0162df72854c640310835c700015ec04980fb4860e3ef42c017cebe05d8b83d013708977dce169b7df6b24486fd8740022e59
|
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
|