Merge pull request 'add OAuth2 env variables' (#14) from jmakdah2/loomio:OAuth2 into main

Reviewed-on: https://git.coopcloud.tech/coop-cloud/loomio/pulls/14
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
This commit is contained in:
jmakdah2
2025-07-31 23:30:50 +00:00
5 changed files with 47 additions and 0 deletions
+1
View File
@@ -22,6 +22,7 @@ steps:
SECRET_SECRET_COOKIE_TOKEN_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
SECRET_SMTP_PASSWORD_VERSION: v1
SECRET_OAUTH_APP_SECRET_VERSION: v1
trigger:
branch:
- main
+14
View File
@@ -90,3 +90,17 @@ SECRET_DB_PASSWORD_VERSION=v1
# THEME_ACCENT_COLOR=rgb(0,188,212)
# THEME_TEXT_ON_PRIMARY_COLOR=rgb(255,255,255)
# THEME_TEXT_ON_ACCENT_COLOR=rgb(255,255,255)
# env variables needed to enable OAuth2 authentication
# COMPOSE_FILE="$COMPOSE_FILE:compose.oauth.yml"
# OAUTH_ENABLED=1
# OAUTH_AUTH_URL=
# OAUTH_TOKEN_URL=
# OAUTH_PROFILE_URL=
# OAUTH_SCOPE=
# OAUTH_APP_KEY=
# OAUTH_ATTR_UID=
# OAUTH_ATTR_NAME=
# OAUTH_ATTR_EMAIL=
# OAUTH_LOGIN_PROVIDER_NAME=
# SECRET_OAUTH_APP_SECRET_VERSION=v1
+25
View File
@@ -0,0 +1,25 @@
version: "3.8"
x-oauth-env: &oauth-env
OAUTH_AUTH_URL:
OAUTH_TOKEN_URL:
OAUTH_PROFILE_URL:
OAUTH_SCOPE:
OAUTH_APP_KEY:
OAUTH_APP_SECRET_FILE: /run/secrets/oauth_app_secret
OAUTH_ATTR_UID:
OAUTH_ATTR_NAME:
OAUTH_ATTR_EMAIL:
OAUTH_LOGIN_PROVIDER_NAME:
services:
app:
environment:
*oauth-env
secrets:
- oauth_app_secret
secrets:
oauth_app_secret:
name: ${STACK_NAME}_oauth_app_secret_${SECRET_OAUTH_APP_SECRET_VERSION}
external: true
+5
View File
@@ -25,6 +25,11 @@ file_env "DEVISE_SECRET"
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 }}
export DB_HOST="db"
export DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}"
+2
View File
@@ -0,0 +1,2 @@
Add support for OAuth2. To use this feature copy and populate the new oauth2 env variables from the .env.sample to your locale .env config and insert the oauth2_app_secret secret into your recipe:
abra app secret insert <domain> oauth_app_secret v1 <your oauth2 client secret>