docker icon indicating copy to clipboard operation
docker copied to clipboard

Generalize config (env var) configuration, move NEXTCLOUD_TRUSTED_DOMAINS out of entrypoint.sh

Open rossbcan opened this issue 5 years ago • 1 comments

Folks;

It is an inconvenience to have to remove / reinstall nextcloud to change NEXTCLOUD_TRUSTED_DOMAINS via environment variables. If extra config is done by altering config/config.php, changes are lost on re-install and must be done manually, each update.

Suggest that setting NEXTCLOUD_TRUSTED_DOMAINS be moved out of entrypoint.sh (only set @nc update/install) and moved to (new) file config/extra_config.php which sets extra config (at nextcloud start) similarly to how email is configured by config/smtp.config.php

If all possible config settings (eg: overwritehost, overwritewebroot) have corresponding $ENV vars (NEXTCLOUD_<var name, uppercase>) for config/extra_config.php,, all config can be done by environment variables, in a generalized manner.

Env vars with space separated entries translate to array (eg: trusted_domains), else 'var' > 'value', in config/extra_config.php.

I noted this inconvenience (manual intervention required post nextcloud install/update) while porting / generalizing docker/nextcloud as part of www.rossco.org endeavors.

Regards; Bill

rossbcan avatar Feb 01 '20 10:02 rossbcan

Have a look here, most of it is already done, but not documented: https://github.com/nextcloud/server/pull/3966

sveneh avatar Feb 11 '20 12:02 sveneh