Skip to content

Commit

Permalink
Cuberfile: add support for scoped config dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
zonque committed Apr 18, 2024
1 parent a8a1ea6 commit b7cfa27
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions Cuberfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ kubeconfig ENV['KUBECONFIG']

migrate 'bundle exec rails db:migrate'

env 'SECRET_KEY_BASE', File.read('deploy/secrets/secret_key_base').strip, secret: true
env 'ALTCHA_HMAC_KEY', File.read('deploy/secrets/altcha.hmac_key').strip, secret: true
env 'MAPTILER_API_KEY', File.read('deploy/secrets/maptiler.api_key').strip, secret: true

env 'HOPHUB_BASE_URL', File.read('deploy/config/base_url').strip
env 'HOPHUB_DATABASE_USERNAME', File.read('deploy/config/db.username').strip
env 'HOPHUB_DATABASE_PASSWORD', File.read('deploy/secrets/db.password').strip, secret: true
env 'HOPHUB_DATABASE_HOST', File.read('deploy/config/db.host').strip
env 'HOPHUB_DATABASE_PORT', File.read('deploy/config/db.port').strip
env 'HOPHUB_DATABASE_NAME', File.read('deploy/config/db.name').strip
env 'HOPHUB_MAIL_SERVER', File.read('deploy/config/mail.server').strip
env 'HOPHUB_MAIL_PORT', File.read('deploy/config/mail.port').strip
env 'HOPHUB_MAIL_FROM', File.read('deploy/config/mail.from').strip
env 'HOPHUB_MAIL_DOMAIN', File.read('deploy/config/mail.domain').strip
env 'HOPHUB_MAIL_EVENT_CONFIRMED_BCC', File.read('deploy/config/mail.event_confirmed_bcc').strip
env 'HOPHUB_MAIL_GDPR_RESPONSE_BCC', File.read('deploy/config/mail.gdpr_response_bcc').strip
env 'EXCEPTION_NOTIFIER_SENDER', File.read('deploy/config/exception_notifier.sender_address').strip
env 'EXCEPTION_NOTIFIER_RECIPIENT', File.read('deploy/config/exception_notifier.recipient').strip
env 'SECRET_KEY_BASE', File.read("#{ENV['CONFIG_ROOT']}/secrets/secret_key_base").strip, secret: true
env 'ALTCHA_HMAC_KEY', File.read("#{ENV['CONFIG_ROOT']}/secrets/altcha.hmac_key").strip, secret: true
env 'MAPTILER_API_KEY', File.read("#{ENV['CONFIG_ROOT']}/secrets/maptiler.api_key").strip, secret: true

env 'HOPHUB_BASE_URL', File.read("#{ENV['CONFIG_ROOT']}/config/base_url").strip
env 'HOPHUB_DATABASE_USERNAME', File.read("#{ENV['CONFIG_ROOT']}/config/db.username").strip
env 'HOPHUB_DATABASE_PASSWORD', File.read("#{ENV['CONFIG_ROOT']}/secrets/db.password").strip, secret: true
env 'HOPHUB_DATABASE_HOST', File.read("#{ENV['CONFIG_ROOT']}/config/db.host").strip
env 'HOPHUB_DATABASE_PORT', File.read("#{ENV['CONFIG_ROOT']}/config/db.port").strip
env 'HOPHUB_DATABASE_NAME', File.read("#{ENV['CONFIG_ROOT']}/config/db.name").strip
env 'HOPHUB_MAIL_SERVER', File.read("#{ENV['CONFIG_ROOT']}/config/mail.server").strip
env 'HOPHUB_MAIL_PORT', File.read("#{ENV['CONFIG_ROOT']}/config/mail.port").strip
env 'HOPHUB_MAIL_FROM', File.read("#{ENV['CONFIG_ROOT']}/config/mail.from").strip
env 'HOPHUB_MAIL_DOMAIN', File.read("deploy/config/mail.domain").strip
env 'HOPHUB_MAIL_EVENT_CONFIRMED_BCC', File.read("#{ENV['CONFIG_ROOT']}/config/mail.event_confirmed_bcc").strip
env 'HOPHUB_MAIL_GDPR_RESPONSE_BCC', File.read("#{ENV['CONFIG_ROOT']}/config/mail.gdpr_response_bcc").strip
env 'EXCEPTION_NOTIFIER_SENDER', File.read("#{ENV['CONFIG_ROOT']}/config/exception_notifier.sender_address").strip
env 'EXCEPTION_NOTIFIER_RECIPIENT', File.read("#{ENV['CONFIG_ROOT']}/config/exception_notifier.recipient").strip

# Run and scale any command on Kubernetes
proc :web, 'bundle exec rails s', scale: 8
Expand Down

0 comments on commit b7cfa27

Please sign in to comment.