[stable10] Allow the config dir to be specified via the enviroment #1081

Merged
merged 2 commits into from Aug 26, 2016

5 participants

@nickvergessen
Nextcloud member

Backport of #660 to make @jospoortvliet happy.

gdamjan added some commits Jul 29, 2016
@gdamjan gdamjan introduce NEXTCLOUD_CONFIG_DIR env variable (see #300)
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`.
cc8b508
@gdamjan gdamjan SetupController should use \OC::$configDir too
a076a0d
@nickvergessen nickvergessen added this to the Nextcloud 10.0.1 milestone Aug 26, 2016
@nickvergessen
Nextcloud member

@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)

@karlitschek
Nextcloud member

nice feature. please backport

@gdamjan
gdamjan commented Aug 26, 2016 edited

looks good to me
LGTM

@LukasReschke
Nextcloud member

LGTM

@LukasReschke LukasReschke merged commit 977c49a into stable10 Aug 26, 2016

3 of 4 checks passed

approvals/lgtm this commit is pending approval
Details Scrutinizer 2 new issues
Details continuous-integration/drone the build was successful
Details continuous-integration/travis-ci/pr The Travis CI build passed
@LukasReschke LukasReschke deleted the backport-660-config-path-from-env branch Aug 26, 2016
@jospoortvliet
Nextcloud member

Thanks all! Love and hugs ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment