Skip to content

Commit

Permalink
add comment to .env.erb file
Browse files Browse the repository at this point in the history
  • Loading branch information
snopoke committed Sep 21, 2023
1 parent c68b42b commit f9b51e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deploy/.env.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<%#
This file is used by Kamal to generate the `deploy/.env` file when running `kamal envify`
It is a Ruby 'ERB' template, so you can use Ruby code in it.
See https://fireapp.kkbox.com/doc/tutorial_2.html for more information.
%>
<% `op signin --account dimagi.1password.com --raw` %>
<% if $?.exitstatus == 0 %>
<% vars = YAML.load(`op item get --vault "CommCare Connect" "Connect Secrets" --fields type=string,type=concealed`) %>
<% for var in vars %><% if var.key?("Value") %><% if var["Value"].kind_of?(Array) %>
<%= var['Label'] %>=<%= var['Value'].join(',') %>
<% else %><%= var['Label'] %>=<%= var['Value'] %>
<% end %><% end %><% end %>
<% else raise ArgumentError, "Error getting values from 1Password" end %>
<% else raise ArgumentError, "Error getting values from 1Password. Try sign in." end %>

0 comments on commit f9b51e0

Please sign in to comment.