-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
Secrets? #392
Comments
No this is probably not supported currently, but you can easily change the password after the container is started. |
Here's an example of how to add it in, if you're interested: https://github.com/wallabag/docker/pull/248/files |
I might have misunderstood the use case, if so I apologize in advance. |
For now I'm using this hack: name: Notifications
services:
gotify:
image: gotify/server
# Hack to get around the lack of secret support in Gotify
entrypoint: ['/bin/sh', '-c', 'GOTIFY_DEFAULTUSER_PASS=$(cat /run/secrets/admin_password) ./gotify-app']
secrets:
- admin_password
secrets:
admin_password:
file: ./secrets/admin_password It is not clean at all, but it works. @jmattheis I reckon it could be a nice addition to configor; having a way to indicate that a configuration field can be either burnt in or specified through a filepath. category:
field-file: /blah If the @SweBarre FWIW, in the example you gave, the reason # usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
mysql_error "Both $var and $fileVar are set (but are exclusive)"
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
} Which does what @STaRDoGG suggested; the problem is gotify doesn't have an entrypoint file, it's all in golang, so two options are available
|
Does Gotify support docker secrets? In particular for the
GOTIFY_DEFAULTUSER_PASS
variable? I've looked at the docs but see no reference. if not, can it be added?The text was updated successfully, but these errors were encountered: