fly.io-rails 0.0.12-arm64-darwin → 0.0.13-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/terraform_generator.rb +13 -0
- 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: eaa6aad97621955457153f28418a9111e2f4fbc793d6db5a91f4877ca37e77ec
|
4
|
+
data.tar.gz: 850851911bc297a5e7f984ced6cf781118228b1c5b38cf7ded304f3a3e337c1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e085510590cf677d4fe8b4d8f278cda9237869ab5eb0b1fbc7bf83f2fa298c2ca4d321fc0ba3de5df533f52fd8280b4ed2c67be9eced2a106995d3c2a8fa755f
|
7
|
+
data.tar.gz: 23d41bb2471292422b215ba80be9d1a021e2b7eed4ed3ddaeb26273f993af4c9e5ad59845be24846b1c8f03ce14732fd439c28827cbce2b86528beefcb36949d
|
data/lib/fly.io-rails/version.rb
CHANGED
@@ -41,6 +41,19 @@ class TerraformGenerator < Rails::Generators::Base
|
|
41
41
|
template 'main.tf.erb', 'main.tf'
|
42
42
|
template 'fly.rake.erb', 'lib/tasks/fly.rake'
|
43
43
|
|
44
|
+
credentials = nil
|
45
|
+
if File.exist? 'config/credentials/production.key'
|
46
|
+
credentials = 'config/credentials/production.key'
|
47
|
+
elsif File.exist? 'config/master.key'
|
48
|
+
credentials = 'config/master.key'
|
49
|
+
end
|
50
|
+
|
51
|
+
if credentials
|
52
|
+
say_status :run, "flyctl secrets set RAILS_MASTER_KEY from #{credentials}"
|
53
|
+
system "flyctl secrets set RAILS_MASTER_KEY=#{IO.read(credentials).chomp}"
|
54
|
+
puts
|
55
|
+
end
|
56
|
+
|
44
57
|
ENV['FLY_API_TOKEN'] = `flyctl auth token`
|
45
58
|
tee 'terraform init'
|
46
59
|
end
|