-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[stable10] Allow the config dir to be specified via the enviroment #1081
Conversation
nextcloud by default uses the `/config/` directory in the source/application tree for its config file(s). with this commit that directory can be overridden by the `NEXTCLOUD_CONFIG_DIR` environment variable. in uwsgi, you would use the option `--env "NEXTCLOUD_CONFIG_DIR=/tmp/nx-config/"` in apache `SetENV …` and the cli command can be run with: `NEXTCLOUD_CONFIG_DIR=/tmp/nx-config ./occ` (or just use `export` once in the shell). NEXTCLOUD_CONFIG_DIR can be supplied with or without the trailing slash (`/`), but in all cases `$configDir` will have it automatically added if needed. The other changes are several occurrences of `OC::$SERVERROOT . '/config'` to `OC::$configDir`.
@gdamjan @kyrofa feel free to review this. @karlitschek for backport approval (requested by the snappy guys so they dont have to patch it after each update again) |
nice feature. please backport |
looks good to me |
LGTM |
Thanks all! Love and hugs ;-) |
Having a problem with this. If there is no config.php in webroot/config/ folder the occ commands seem to be broken. I've tried to put the config.php only in /etc/nextcloud System itself works fine but occ commands return these errors
|
if you use this feature for the server, you need to define the envrinment variable in your shell too, before calling occ. one example , with sudo is: |
@gdamjan thanks i missed that, works now |
Backport of #660 to make @jospoortvliet happy.