Docker environment variables

Hi,

every now and then I’m tinkering on an app to make Minio available through the Univention appcenter. In their Docker guide the minio devs are suggesting to pass keys and secrets through Environment variables to the Container.

I know that I can specify these variables in the provider portal and through an env file, but is it also possible that the user modifies them?

This could also become interesting for Kopano konnect, where we currently pass configuration vie environment variables.

Hello @fbartels,

those settings can be asked from the user with the App Settings. They should be sufficient for what you have in mind.

Best regards,
Nico

Hi,

yes, this is possible. The env file is for “static” environment variables. Please have a look at https://wiki.univention.de/index.php/App_Settings. You could do something like:

[PASSWORD_VARIABLE]
Type = Password
Required = True
Show = Install
ShowReadOnly = Settings

This should give a user a form before installing the App that requires him to specify a password. PASSWORD_VARIABLE=mypassword will then be appended to the regular env file.

Kind regards,
Dirk Wiesenthal

Hi @gulden @dwiesent,

ah right. I totally forgot that app settings are automatically in the env file in the container and therefore environment variables (at least if they have the scope “inside”).

Tested and works as expected.

Thanks for the quick response.

Mastodon