This is an automated email from the ASF dual-hosted git repository. jan pushed a commit to branch fix/conf in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git
commit c8157a31f6bea442385a956242d664747c631a4e Author: Jan Lehnardt <[email protected]> AuthorDate: Fri Sep 14 12:06:45 2018 +0200 feat: update docs for new query server config See https://github.com/apache/couchdb/pull/1602 --- src/config/http-handlers.rst | 232 ------------------------------------------- src/config/index.rst | 1 - src/config/query-servers.rst | 21 ++-- 3 files changed, 10 insertions(+), 244 deletions(-) diff --git a/src/config/http-handlers.rst b/src/config/http-handlers.rst deleted file mode 100644 index df06fe5..0000000 --- a/src/config/http-handlers.rst +++ /dev/null @@ -1,232 +0,0 @@ -.. Licensed under the Apache License, Version 2.0 (the "License"); you may not -.. use this file except in compliance with the License. You may obtain a copy of -.. the License at -.. -.. http://www.apache.org/licenses/LICENSE-2.0 -.. -.. Unless required by applicable law or agreed to in writing, software -.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -.. License for the specific language governing permissions and limitations under -.. the License. - -.. highlight:: ini - -====================== -HTTP Resource Handlers -====================== - -.. _config/httpd_global_handlers: - -Global HTTP Handlers -==================== - -.. config:section:: httpd_global_handlers :: Global HTTP Handlers - - These HTTP resources are provided for CouchDB server root level. - - .. config:option:: / - - :: - - [httpd_global_handlers] - / = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>} - - .. config:option:: favicon.ico - - The favicon handler looks for `favicon.ico` file within specified - directory:: - - [httpd_global_handlers] - favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "/usr/share/couchdb/www"} - - .. config:option:: _active_tasks - - :: - - [httpd_global_handlers] - _active_tasks = {couch_httpd_misc_handlers, handle_task_status_req} - - .. config:option:: _all_dbs - - Provides a list of all server's databases:: - - [httpd_global_handlers] - _all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req} - - .. note:: - Sometimes you don't want to disclose database names for everyone, - but you also don't like/want/able to set up any proxies in front of - CouchDB. Removing this handler disables ``_all_dbs`` resource and - there will be no way to get list of available databases. - - The same also is true for other resource handlers. - - .. config:option:: _config - - Provides resource to work with CouchDB config - :ref:`remotely <api/config>`. Any config changes that was made via HTTP - API are applied automatically on fly and doesn't requires server - instance to be restarted:: - - [httpd_global_handlers] - _config = {couch_httpd_misc_handlers, handle_config_req} - - .. config:option:: _replicate - - Provides an API to run - :ref:`temporary replications <api/server/replicate>`:: - - [httpd_global_handlers] - _replicate = {couch_replicator_httpd, handle_req} - - .. config:option:: _session - - Provides a resource with information about the current user's session:: - - [httpd_global_handlers] - _session = {couch_httpd_auth, handle_session_req} - - .. config:option:: _stats - - :: - - [httpd_global_handlers] - _stats = {couch_httpd_stats_handlers, handle_stats_req} - - .. config:option:: _utils - - The :ref:`_utils <api/server/utils>` handler serves `Fauxton`'s web - administration page:: - - [httpd_global_handlers] - _utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "/usr/share/couchdb/www"} - - In similar way, you may set up custom handler to let CouchDB serve any - static files. - - .. config:option:: _uuids - - Provides a resource to get UUIDs generated by CouchDB:: - - [httpd_global_handlers] - _uuids = {couch_httpd_misc_handlers, handle_uuids_req} - - This is useful when your client environment isn't capable of providing - truly random IDs (web browsers e.g.). - -.. _config/httpd_db_handlers: - -Database HTTP Handlers -====================== - -.. config:section:: httpd_db_handlers :: Database HTTP Handlers - - These HTTP resources are available on every CouchDB database. - - .. config:option:: _all_docs - - :: - - [httpd_db_handlers] - _all_docs = {couch_mrview_http, handle_all_docs_req} - - .. config:option:: _local_docs - - :: - - [httpd_db_handlers] - _local_docs = {couch_mrview_http, handle_local_docs_req} - - .. config:option:: _design_docs - - :: - - [httpd_db_handlers] - _design_docs = {couch_mrview_http, handle_design_docs_req} - - .. config:option:: _changes - - :: - - [httpd_db_handlers] - _changes = {couch_httpd_db, handle_changes_req} - - .. config:option:: _compact - - :: - - [httpd_db_handlers] - _compact = {couch_httpd_db, handle_compact_req} - - .. config:option:: _design - - :: - - [httpd_db_handlers] - _design = {couch_httpd_db, handle_design_req} - - .. config:option:: _view_cleanup - - :: - - [httpd_db_handlers] - _view_cleanup = {couch_mrview_http, handle_cleanup_req} - -.. _config/httpd_design_handlers: - -Design Documents HTTP Handlers -============================== - -.. config:section:: httpd_design_handlers :: Design Documents HTTP Handlers - -These HTTP resources are provided for design documents. - - .. config:option:: _compact - - :: - - [httpd_design_handlers] - _compact = {couch_mrview_http, handle_compact_req} - - .. config:option:: _info - - :: - - [httpd_design_handlers] - _info = {couch_mrview_http, handle_info_req} - - .. config:option:: _list - - :: - - [httpd_design_handlers] - _list = {couch_mrview_show, handle_view_list_req} - - .. config:option:: _rewrite - - :: - - [httpd_design_handlers] - _rewrite = {couch_httpd_rewrite, handle_rewrite_req} - - .. config:option:: _show - - :: - - [httpd_design_handlers] - _show = {couch_mrview_show, handle_doc_show_req} - - .. config:option:: _update - - :: - - [httpd_design_handlers] - _update = {couch_mrview_show, handle_doc_update_req} - - .. config:option:: _view - - :: - - [httpd_design_handlers] - _view = {couch_mrview_http, handle_view_req} diff --git a/src/config/index.rst b/src/config/index.rst index 1fec7a7..64b03bf 100644 --- a/src/config/index.rst +++ b/src/config/index.rst @@ -29,6 +29,5 @@ Configuring CouchDB logging replicator query-servers - http-handlers services misc diff --git a/src/config/query-servers.rst b/src/config/query-servers.rst index 97191f5..f5d6a5f 100644 --- a/src/config/query-servers.rst +++ b/src/config/query-servers.rst @@ -23,28 +23,28 @@ Query Servers Definition .. config:section:: query_servers :: Query Servers Definition - .. versionchanged:: 1.2: Added CoffeeScript query server + .. versionchanged:: 2.2: Changed configuration method for Query Servers + and Native Query Servers. CouchDB delegates computation of :ref:`design documents <ddocs>` functions to external query servers. The external query server is a special OS process which communicates with CouchDB over standard input/output using a very simple line-based protocol with JSON messages. - The external query server may be defined in configuration file following + The external query server may be defined with environment variables following next pattern:: - [query_servers] - LANGUAGE = PATH ARGS + COUCHDB_QUERY_SERVER_LANGUAGE="PATH ARGS" Where: - ``LANGUAGE``: is a programming language which code this query server may execute. For instance, there are `python`, `ruby`, `clojure` and other - query servers in wild. This value is also used for `ddoc` field - ``language`` to determine which query server processes the functions. + query servers in wild. This value in lowercase is also used for `ddoc` + field ``language`` to determine which query server processes the functions. Note, that you may set up multiple query servers for the same programming - language, but you have to name them different (like `python-dev` etc.). + language, but you have to name them different (like `PYTHONDEV` etc.). - ``PATH``: is a system path to the executable binary program that runs the query server. @@ -55,9 +55,8 @@ Query Servers Definition The default query server is written in :ref:`JavaScript <query-server/js>`, running via `Mozilla SpiderMonkey`_:: - [query_servers] - javascript = /usr/bin/couchjs /usr/share/couchdb/server/main.js - coffeescript = /usr/bin/couchjs /usr/share/couchdb/server/main-coffee.js + COUCHDB_QUERY_SERVER_JAVASCRIPT="/usr/bin/couchjs /usr/share/server/main.js" + COUCHDB_QUERY_SERVER_COFFEESCRIPT="/usr/bin/couchjs /usr/share/server/main-coffee.js" .. _Mozilla SpiderMonkey: https://developer.mozilla.org/en/docs/SpiderMonkey @@ -151,7 +150,7 @@ Native Erlang Query Server ``[native_query_servers]`` section:: [native_query_servers] - erlang = {couch_native_process, start_link, []} + enable_erlang_query_server = true To see these changes you will also need to restart the server.
