Skip to content

Commit

Permalink
Allow override of -couch_ini parameter
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
adrienverge committed Dec 12, 2019
1 parent cda9430 commit f56ce83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rel/files/couchdb.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ export COUCHDB_QUERY_SERVER_COFFEESCRIPT="{{prefix}}/bin/couchjs {{prefix}}/shar
export COUCHDB_FAUXTON_DOCROOT={{fauxton_root}}

ARGS_FILE="${COUCHDB_ARGS_FILE:-$ROOTDIR/etc/vm.args}"
INI_FILES=${COUCHDB_INI_FILES:-}
SYSCONFIG_FILE="${COUCHDB_SYSCONFIG_FILE:-$ROOTDIR/releases/$APP_VSN/sys.config}"

exec "$BINDIR/erlexec" -boot "$ROOTDIR/releases/$APP_VSN/couchdb" \
-args_file "${ARGS_FILE}" \
-couch_ini ${INI_FILES} \
-config "${SYSCONFIG_FILE}" "$@"

0 comments on commit f56ce83

Please sign in to comment.