From 1753b6a455077af8e9f1480c567f1889711dd9a6 Mon Sep 17 00:00:00 2001 From: CJ_Clippy Date: Thu, 16 Jan 2025 12:39:11 -0800 Subject: [PATCH] raise if missing env --- config/deploy.yml | 2 ++ services/bright/config/config.exs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/deploy.yml b/config/deploy.yml index 7516460..b203dc4 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -61,6 +61,8 @@ env: - DATABASE_URL - SECRET_KEY_BASE - SUPERSTREAMER_AUTH_TOKEN + - GITHUB_CLIENT_SECRET + - GITHUB_CLIENT_ID # Aliases are triggered with "bin/kamal ". You can overwrite arguments on invocation: # "bin/kamal logs -r job" will tail logs from the first server in the job section. diff --git a/services/bright/config/config.exs b/services/bright/config/config.exs index 942613f..380ab36 100644 --- a/services/bright/config/config.exs +++ b/services/bright/config/config.exs @@ -40,8 +40,8 @@ config :ueberauth, Ueberauth, ] config :ueberauth, Ueberauth.Strategy.Github.OAuth, - client_id: System.get_env("GITHUB_CLIENT_ID"), - client_secret: System.get_env("GITHUB_CLIENT_SECRET") + client_id: System.get_env("GITHUB_CLIENT_ID") || raise("environment variable GITHUB_CLIENT_ID is missing."), + client_secret: System.get_env("GITHUB_CLIENT_SECRET") || raise("environment variable GITHUB_CLIENT_SECRET is missing.") # Configures the mailer #