From b7cfa2709221cfdce409e1b0bd30e2d6b8189c91 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Thu, 18 Apr 2024 19:35:00 +0200 Subject: [PATCH] Cuberfile: add support for scoped config dirs --- Cuberfile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Cuberfile b/Cuberfile index 3313dd3..bf35d8c 100644 --- a/Cuberfile +++ b/Cuberfile @@ -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