wohali opened a new issue #2143: `couchdb` and `couchdb.cmd` startup scripts do 
not allow overriding JS/CoffeeScript variables
URL: https://github.com/apache/couchdb/issues/2143
 
 
   ## Description
   
   It should be possible for a user to set `COUCHDB_QUERY_SERVER_JAVASCRIPT` or 
`COUCHDB_QUERY_SERVER_COFFEESCRIPT` or the Fauxton document root in the shell 
before invoking `/opt/couchdb/bin/couchdb` or `couchdb.cmd` and have those 
settings carry over to CouchDB.
   
   Unfortunately, we forcibly override those settings:
   
   
https://github.com/apache/couchdb/blob/57bf82e5cc3c3ab55ad6c3e46ea2c666ac2711cc/rel/files/couchdb.in#L29-L31
   
   
https://github.com/apache/couchdb/blob/c850ffa889dc1f8bf562107aa07da429357bc8ef/rel/files/couchdb.cmd.in#L28-L29
   
   ## Steps to Reproduce
   
   Export the environment var, then invoke `couchdb` or `couchdb.cmd`.
   
   ## Suggested fix:
   
   Use the following structure:
   
   ```bash
   export 
COUCHDB_QUERY_SERVER_JAVASCRIPT=${COUCHDB_QUERY_SERVER_JAVASCRIPT:-{{prefix}}/bin/couchjs
 {{prefix}}/share/server/main.js"
   ```
   
   or, in the `couchdb.cmd` file:
   
   ```batch
   IF NOT DEFINED COUCHDB_QUERY_SERVER_JAVASCRIPT SET 
COUCHDB_QUERY_SERVER_JAVASCRIPT="{{prefix}}/bin/couchjs 
{{prefix}}/share/server/main.js"
   ```
   
   ## Your Environment
   
   * CouchDB Version used: 2.3.1
   
   ## Additional context
   
   Migrated from https://github.com/apache/couchdb-docker/issues/149
   
   /cc @janl
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to