-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add _FILE support for all (sensitive) variables #9482
Comments
This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this. You can learn about how to get started in our contributors documentation. |
There are already similar environment wrappers in https://github.com/WeblateOrg/weblate/blob/main/weblate/utils/environment.py, adding another one should be easy. |
The secrets have to be declared in docker-compose.yml to be available in the container. But doing these changes in the docker-compose file seems a little odd. Can you suggest me where should that be declared ? |
There are two things:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
- do not directly use os.environ - fail with a nicer error message if missing configuration - annotate more configurations as required - support for file backed secrets, fixes WeblateOrg#9482
- do not directly use os.environ - fail with a nicer error message if missing configuration - annotate more configurations as required - support for file backed secrets, fixes WeblateOrg#9482
- do not directly use os.environ - fail with a nicer error message if missing configuration - annotate more configurations as required - support for file backed secrets, fixes #9482
- do not directly use os.environ - fail with a nicer error message if missing configuration - annotate more configurations as required - support for file backed secrets, fixes WeblateOrg#9482
Thank you for your report; the issue you have reported has just been fixed.
|
@nijel: thanks! |
Describe the problem
I'd like to connect my Weblate installation to Azure AD. Weblate runs in Docker. Right now, this requires that I specify
WEBLATE_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET
as an environment variable.I would like to use Docker secrets to pass the secret to Weblate.
Right now, only a limited number of environment variables support reading from a file.
Describe the solution you'd like
I would like to propose that a wrapper function for
os.environ.get()
is added tosettings_docker.py
such that all environment variables that could be sensitive can be read from a file if${VARNAME}_FILE
exists. This would also remove the need for a manual list of variables in the start script.Describe alternatives you've considered
No response
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: