From 746413e31eb660b57ed006bb7a37e6104f5feff4 Mon Sep 17 00:00:00 2001 From: Jackie Makdah Date: Sat, 2 Aug 2025 12:33:14 -0700 Subject: [PATCH] fix for OAUTH_ENABLED check --- abra.sh | 2 +- compose.oauth.yml | 6 ++++++ entrypoint.sh | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/abra.sh b/abra.sh index 0d5fddd..2f68918 100644 --- a/abra.sh +++ b/abra.sh @@ -1,4 +1,4 @@ -export LOOMIO_ENTRYPOINT_VERSION=v7 +export LOOMIO_ENTRYPOINT_VERSION=v8 # cannot be integrated into entrypoint.sh as it requires the operator to create a user first function make_last_user_admin() diff --git a/compose.oauth.yml b/compose.oauth.yml index 7206c25..95171a9 100644 --- a/compose.oauth.yml +++ b/compose.oauth.yml @@ -11,6 +11,7 @@ x-oauth-env: &oauth-env OAUTH_ATTR_NAME: OAUTH_ATTR_EMAIL: OAUTH_LOGIN_PROVIDER_NAME: + OAUTH_ENABLED: services: app: @@ -18,6 +19,11 @@ services: *oauth-env secrets: - oauth_app_secret + worker: + environment: + *oauth-env + secrets: + - oauth_app_secret secrets: oauth_app_secret: diff --git a/entrypoint.sh b/entrypoint.sh index fe78f5f..9e6df6c 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,9 +26,9 @@ file_env "SECRET_COOKIE_TOKEN" file_env "POSTGRES_PASSWORD" file_env "SMTP_PASSWORD" -{{ if eq (env "OAUTH_ENABLED") "1" }} -file_env "OAUTH_APP_SECRET" -{{ end }} +if [ "$OAUTH_ENABLED" = "1" ]; then + file_env "OAUTH_APP_SECRET" +fi export DB_HOST="db" export DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}" -- 2.49.0