fly.io-rails 0.0.12-x86-linux → 0.0.13-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/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: 1e8702fd0340271db744295fe652c95004453f99ec9a926a5a3e3d264454a365
|
4
|
+
data.tar.gz: 5efb500895f53801a38763eed56b8ebc2b7c3f2d1ac528ffce02ac471a270f3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8898673f5970004a16ae03110dd554a3ade7febd7a0db5d1af938d1e1b27d7e3501e0b68bfc0712e3a9b649fe905f7442eb581e414cb483829588b9b6e154ae2
|
7
|
+
data.tar.gz: d6d8763a6005a8dbc769e372aec46c2a5335abffbc49ec4e3c4baeb40faca9c6bd0408734bdf3b7db12b0a6e0ce06e2f71f3d747905a0248787692e4fa5fb402
|
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
|