docker icon indicating copy to clipboard operation
docker copied to clipboard

some vars go into black hole - eg. OVERWRITEWEBROOT OVERWRITEPROTOCOL (and more?)

Open lejeczek opened this issue 3 years ago • 2 comments

Hi. I deploy containers with podman: -> $ podman run ... -e MYSQL_DATABASE="nextcloud_in_ccnr" -e MYSQL_USER="some" -e MYSQL_PASSWORD="else#some" -e MYSQL_HOST="11.1.0.1" -e NEXTCLOUD_ADMIN_USER="adm" -e NEXTCLOUD_ADMIN_PASSWORD="some'adm" -e TRUSTED_PROXIES="10.0.1.8 10.0.1.16 10.0.1.17" -e OVERWRITEPROTOCOL="https" -e OVERWRITEWEBROOT="/work"

and I think (some) vars. eg.: OVERWRITEPROTOCOL OVERWRITEWEBROOT TRUSTED_PROXIES are ignored. I do not see them landing anywhere, certainly they do not go into 'config.php' - whereas others, eg.: MYSQL_HOST MYSQL_DATABASE MYSQL_USER as expected land in 'config.php'

many thanks, L.

lejeczek avatar Feb 10 '22 10:02 lejeczek

Nextcloud will look every .php file in the config directory. You can see how OVERWRITEPROTOCOL, OVERWRITEWEBROOT, and TRUSTED_PROXIES get set in this file

If you add config files, either by extending the NC image, or by just copying in a new config file, you can essentially create new mappings from env vars to NC config -- using the base docker configs as examples.

especially-relative avatar Feb 19 '22 19:02 especially-relative

These variables are only used when initializing the container. Once it has been setup, these variables are not used anymore and must be changed in config.php manually

schklom avatar Mar 04 '22 02:03 schklom

Some variables land in config.php at install time while others are runtime and never land directly into config.php even though they're still active.

Check the output of occ config:list system instead of config.php directly.

joshtrichards avatar Nov 05 '23 14:11 joshtrichards