add OAuth2 env variables #14
Reference in New Issue
Block a user
No description provided.
Delete Branch "jmakdah2/loomio:OAuth2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nice work!
Can we test if the recipe works fine if we created an app out of it but kept these env variables empty/commented out in the .env file?
If so, we might need to put them in their own compose file rather than extending the main compose file
Great start 🎉
Thanks for the work 👏
@ -93,0 +99,4 @@# OAUTH_APP_KEY=# This is not a good practice, app secret should passed in via docker secret once support is added (https://github.com/loomio/loomio/issues/11671)# Remove this variable before publishing code to any shared repo!Can the secret be configured as a file based secret using an entrypoint hack?
Several other recipes do this to get around the fact the upstream doesn't support it.
You store it in a secret and use the entrypoint to expose it from the FS.
Yep, and no need to add
file_env, it's already in use in the entrypoint: https://git.coopcloud.tech/coop-cloud/loomio/src/branch/main/entrypoint.sh#L24-L29oh this is a much nicer solution :) i've updated it to use that hack
@ -29,6 +29,16 @@ x-environment: &default-envSAML_IDP_METADATA_URL:SAML_ISSUER:FEATURES_DISABLE_EMAIL_LOGIN:OAUTH_AUTH_URL:I think these should rather go in a
compose.oidc.ymllike other recipes?Not everyone will run OIDC and while it looks pretty harmless to have a bunch of empty env vars, you never know what can subtly break with configs/apps/etc. This becomes especially hard to overview when you run several apps. So, my intuition says to keep this separate.
Also, you may want to add a release note (see docs) to tell people that there is a new feature and they can add the env vars from the new
.env.sample?Thanks for the suggestion! I created a separate compose file and will also add a release note
@ammaratef45 I've created a separate compose file as suggested by @decentral1se. So I don't think this should be a concern anymore?
By the way, I see that continuous-integration/drone/pr check failed. Is this a concern? It looks like in the last merged PR it was also failing, and i couldnt determine if the issue was from my change or not (https://build.coopcloud.tech/coop-cloud/loomio/61/1/2)
ef26599b5eto9531f4fe40Nearly there 🤸
@ -25,6 +25,7 @@ file_env "DEVISE_SECRET"file_env "SECRET_COOKIE_TOKEN"file_env "POSTGRES_PASSWORD"file_env "SMTP_PASSWORD"file_env "OAUTH_APP_SECRET"The last trick you're missing now is to wrap this in a "if OAUTH_IS_ENABLED" kinda thing...
As not everyone will enable this and then their deployment will blow up asking them for this secret.
👏
WIP: add OAuth2 env variablesto add OAuth2 env variables