_docker/control.rb
def decrypt_vault_and_modify_env
  begin
    puts 'Decrypting vault and binding environment parameters...'
    crypto = GPGME::Crypto.new
    fname = File.open '../_config/secrets.yaml.gpg'

    secrets = YAML.load(crypto.decrypt(fname).to_s)

    secrets.each do |k, v|
      ENV[k] = v
      puts " - Bound environment variable '#{k}' from decrypted vault"
    end
    puts 'Succesfully decrypted vault and bound environment parameters.'
  rescue GPGME::Error => e
    abort "Unable to decrypt vault (#{e})"
  end
end
#
# Decrypts the vault and then binds all parameters contained within as environment parameters.
#
Decrypts the vault and then binds all parameters contained within as environment parameters.
Decrypts the vault and then binds all parameters contained within as environment parameters .
def decrypt_vault_and_modify_env
  begin
    puts 'Decrypting vault and binding environment parameters...'
    crypto = GPGME::Crypto.new
    fname = File.open '../_config/secrets.yaml.gpg'
    secrets = YAML.load(crypto.decrypt(fname).to_s)
    secrets.each do |k, v|
      ENV[k] = v
      puts " - Bound environment variable '#{k}' from decrypted vault"
    end
    puts 'Succesfully decrypted vault and bound environment parameters.'
  rescue GPGME::Error => e
    abort "Unable to decrypt vault (#{e})"
  end
end
def decrypt_vault_and_modify_env begin puts 'Decrypting vault and binding environment parameters...' crypto = GPGME :: Crypto . new fname = File . open '../_config/secrets.yaml.gpg' secrets = YAML . load ( crypto . decrypt ( fname ) . to_s ) secrets . each do | k , v | ENV [ k ] = v puts " - Bound environment variable '#{k}' from decrypted vault" end puts 'Succesfully decrypted vault and bound environment parameters.' rescue GPGME :: Error => e abort "Unable to decrypt vault (#{e})" end end
Decrypts the vault and then binds all parameters contained within as environment parameters.
Decrypts the vault and then binds all parameters contained within as environment parameters .