Gracefully fail config build when master secret not available
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

When the credentials are not accessible, e.g. on CI, parsing the
database config fails otherwise.
This commit is contained in:
Basti 2020-11-21 16:22:11 +01:00
parent 8bd69b2adb
commit 91c3f8da2d
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72
2 changed files with 5 additions and 5 deletions

View File

@ -25,6 +25,6 @@ production:
adapter: postgresql adapter: postgresql
database: akkounts database: akkounts
port: 5432 port: 5432
host: <%= Rails.application.credentials.postgres[:host] %> host: <%= Rails.application.credentials.postgres[:host] rescue nil %>
username: <%= Rails.application.credentials.postgres[:username] %> username: <%= Rails.application.credentials.postgres[:username] rescue nil %>
password: <%= Rails.application.credentials.postgres[:password] %> password: <%= Rails.application.credentials.postgres[:password] rescue nil %>

View File

@ -50,7 +50,7 @@ production:
port: 636 port: 636
attribute: cn attribute: cn
base: ou=kosmos.org,cn=users,dc=kosmos,dc=org base: ou=kosmos.org,cn=users,dc=kosmos,dc=org
admin_user: <%= Rails.application.credentials.ldap[:username] %> admin_user: <%= Rails.application.credentials.ldap[:username] rescue nil %>
admin_password: <%= Rails.application.credentials.ldap[:password] %> admin_password: <%= Rails.application.credentials.ldap[:password] rescue nil %>
ssl: simple_tls ssl: simple_tls
# <<: *AUTHORIZATIONS # <<: *AUTHORIZATIONS