-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Add support for getting password from file #32853
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
Conversation
Add support for getting password from file. This is good feature for using docker secrets
|
And Gitea has general "file to env" suppport in "environment-to-ini" https://github.com/go-gitea/gitea/blob/main/contrib/environment-to-ini/environment-to-ini.go It is also packed into the docker image. So I think it doesn't need to add a new environment here? gitea/docker/root/etc/s6/gitea/setup Line 60 in df9a78c
|
| INSTALL_LOCK=true | ||
| fi | ||
| if [ "$DB_PASSWD_FILE" ]; then | ||
| DB_PASSWD=`cat $DB_PASSWD_FILE`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| DB_PASSWD=`cat $DB_PASSWD_FILE`; | |
| DB_PASSWD="$(cat $DB_PASSWD_FILE)"; |
backtick syntax is legacy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before making more changes, I would suggest to use existing mechanisms. See my comments above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I guess there are better solutions than to introduce _FILE variables for every variable.
No this not work for swarm mode |
Thats what i am looking for, but there is no such example in wiki. We need to add it into wiki exemple |
Add support for getting password from file.
This is good feature for using docker secrets