-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow override of -args_file
and -config
parameters
#1095
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The existing `couchdb` start script hard-codes the arguments to `-args_file` and `-config`. Although it is possible to copy this script and modify it, or modify it in place, that is less than ideal and can lead to all kinds of difficulties. This PR adds the following environment variables: - `ARGS_FILE`: By default, set to the existing hard-coded value. - `SYSCONFIG_FILE`: By default, set to the existing hard-coded value. - `COUCHDB_ARGS_FILE`: If non-empty, overrides `ARGS_FILE`. - `COUCHDB_SYSCONFIG_FILE`: If non-empty, overrides `SYSCONFIG_FILE`. By changing the script to use these environment variables, it makes it easily possible to use different settings without tinkering with the pristine installed CouchDB environment. Kindly consider this feature request as a useful, and "mostly harmless" addition to CouchDB.
Definitely useful, I had wanted to do this a few months back but never got around to it. Thanks! |
willholley
pushed a commit
to willholley/couchdb
that referenced
this pull request
May 22, 2018
The existing `couchdb` start script hard-codes the arguments to `-args_file` and `-config`. Although it is possible to copy this script and modify it, or modify it in place, that is less than ideal and can lead to all kinds of difficulties. This PR adds the following environment variables: - `ARGS_FILE`: By default, set to the existing hard-coded value. - `SYSCONFIG_FILE`: By default, set to the existing hard-coded value. - `COUCHDB_ARGS_FILE`: If non-empty, overrides `ARGS_FILE`. - `COUCHDB_SYSCONFIG_FILE`: If non-empty, overrides `SYSCONFIG_FILE`. By changing the script to use these environment variables, it makes it easily possible to use different settings without tinkering with the pristine installed CouchDB environment.
natevw
added a commit
to natevw/couchdb-documentation
that referenced
this pull request
Nov 22, 2018
This seems to be a discrepancy from the start, see original pull requests: * apache/couchdb#1095 (code) * apache#227 (docs) Note also the script seems unhappy with relative paths, so I've also snuck a wording change alongside the main fix here.
wohali
pushed a commit
to apache/couchdb-documentation
that referenced
this pull request
Nov 23, 2018
This seems to be a discrepancy from the start, see original pull requests: * apache/couchdb#1095 (code) * #227 (docs) Note also the script seems unhappy with relative paths, so I've also snuck a wording change alongside the main fix here.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Nov 1, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` will have an empty list and CouchDB will start as usual. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Nov 21, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` will have an empty list and CouchDB will start as usual. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` will have an empty list and CouchDB will start as usual. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` will have an empty list and CouchDB will start as usual. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` will have an empty list and CouchDB will start as usual. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` will have an empty list and CouchDB will start as usual. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` will have an empty list and CouchDB will start as usual. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` will have an empty list and CouchDB will start as usual. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 12, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 13, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 13, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
adrienverge
added a commit
to adrienverge/couchdb
that referenced
this pull request
Dec 13, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (apache#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
wohali
pushed a commit
that referenced
this pull request
Dec 18, 2019
This is the continuation of commit 649b808 "Allow override of `-args_file` and `-config` parameters (#1095)". This allows setting the `-couch_ini` files location if needed, using `COUCHDB_INI_FILES` env var: - If unset (the default), `-couch_ini` argument won't be passed. - If set (to a file, or list of files like `COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini /chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with different settings. A useful case is being able to run multiple CouchDB servers on the same machine.
nickva
pushed a commit
to nickva/couchdb
that referenced
this pull request
Sep 7, 2022
This seems to be a discrepancy from the start, see original pull requests: * apache#1095 (code) * apache/couchdb-documentation#227 (docs) Note also the script seems unhappy with relative paths, so I've also snuck a wording change alongside the main fix here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
The existing
couchdb
start script hard-codes the arguments to-args_file
and-config
. Although it is possible to copy thisscript and modify it, or modify it in place, that is less than ideal
and can lead to all kinds of difficulties.
This PR adds the following environment variables:
ARGS_FILE
: By default, set to the existing hard-coded value.SYSCONFIG_FILE
: By default, set to the existing hard-coded value.COUCHDB_ARGS_FILE
: If non-empty, overrides$ARGS_FILE
.COUCHDB_SYSCONFIG_FILE
: If non-empty, overrides$SYSCONFIG_FILE
.By changing the script to use these environment variables, it makes it easily possible
to use different settings without tinkering with the pristine installed CouchDB environment.
Kindly consider this feature request as a useful, and "mostly harmless" addition to CouchDB.
Testing recommendations
This pull request is designed to be completely backward-compatible with the existing
couchdb
script.Testing can be very simple:
COUCHDB_ARGS_FILE=/some/different/vm.args couchdb
- should use the args from the specifiedvm.args
.COUCHDB_SYSCONFIG_FILE=/some/different/sys.config couchdb
- should use the configuration in the specifiedsys.config
.Related Issues or Pull Requests
PR apache/couchdb-documentation#227
Checklist