summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/Makefile.am21
-rw-r--r--etc/couchdb/Makefile.am3
-rw-r--r--etc/couchdb/default.ini.tpl.in56
-rw-r--r--etc/couchdb/local.ini40
-rw-r--r--etc/init/couchdb.tpl.in4
-rw-r--r--etc/windows/Makefile.am13
6 files changed, 118 insertions, 19 deletions
diff --git a/etc/Makefile.am b/etc/Makefile.am
index f83b0efb..148f7015 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -10,7 +10,7 @@
## License for the specific language governing permissions and limitations under
## the License.
-SUBDIRS = couchdb default init launchd logrotate.d
+SUBDIRS = couchdb default init launchd logrotate.d windows
default_sysconf_data = logrotate.d/couchdb
@@ -25,10 +25,15 @@ endif
nobase_sysconf_DATA = $(default_sysconf_data) $(init_sysconf_data)
-EXTRA_DIST = $(init_sysconf_data)
+EXTRA_DIST = \
+ default/couchdb \
+ windows/couchdb.iss.tpl \
+ windows/README.txt.tpl
if WINDOWS
-EXTRA_DIST += windows/setup-couchdb-@version@.exe.md5
+EXTRA_DIST += \
+ windows/setup-couchdb-@version@.exe.md5 \
+ windows/setup-couchdb-@version@.exe.sha
endif
CLEANFILES = $(init_DATA) $(default_sysconf_data) $(launchd_DATA)
@@ -72,7 +77,7 @@ if WINDOWS
# README.txt has \n line endings in the repo and must have \r\n
# when installed as notepad is used to view it.
# Also: the targets below don't seem to update after an svn-up (which
-# changes the version string in the generated files) so we trick make
+# changes the version string in the generated files) so we trick make
# into always building it with the FORCE pattern...
windows/README.txt: windows/README.txt.tpl FORCE
sed -e "s|%package_name%|@package_name@|g" \
@@ -93,12 +98,14 @@ windows/couchdb.iss: windows/couchdb.iss.tpl FORCE
# The installer depends on all files, not just the source .iss file,
# so we trick make into always building it with the FORCE pattern...
windows/setup-couchdb-@version@.exe: windows/couchdb.iss windows/README.txt FORCE
- $(INNO_COMPILER_EXECUTABLE) /q $<
+ "$(INNO_COMPILER_EXECUTABLE)" /q $<
@echo Windows Installer is at: `cygpath -a -w windows/setup-couchdb-@version@.exe`
windows/setup-couchdb-@version@.exe.md5: windows/setup-couchdb-@version@.exe
- md5sum $< > $@
- @echo Windows Installer is at: `cygpath -a -w windows/setup-couchdb-@version@.exe`
+ cd windows && md5sum ./$(<F) > $(@F)
+
+windows/setup-couchdb-@version@.exe.sha: windows/setup-couchdb-@version@.exe
+ cd windows && sha1sum ./$(<F) > $(@F)
FORCE:
diff --git a/etc/couchdb/Makefile.am b/etc/couchdb/Makefile.am
index ded52084..9367ceac 100644
--- a/etc/couchdb/Makefile.am
+++ b/etc/couchdb/Makefile.am
@@ -32,6 +32,7 @@ default.ini: default.ini.tpl
-e "s|%localbuilddatadir%|../share/couchdb|g" \
-e "s|%localstatelibdir%|../var/lib/couchdb|g" \
-e "s|%localstatelogdir%|../var/log/couchdb|g" \
+ -e "s|%localstaterundir%|../var/run/couchdb|g" \
-e "s|%couchprivlibdir%|../lib/couch-$(version)/priv/lib|g" \
-e "s|%couchjs_command_name%|couchjs.exe|g" \
< $< > $@
@@ -43,6 +44,7 @@ default.ini: default.ini.tpl
-e "s|%localbuilddatadir%|$(localdatadir)|g" \
-e "s|%localstatelibdir%|$(localstatelibdir)|g" \
-e "s|%localstatelogdir%|$(localstatelogdir)|g" \
+ -e "s|%localstaterundir%|$(localstaterundir)|g" \
-e "s|%couchprivlibdir%|$(couchprivlibdir)|g" \
-e "s|%couchjs_command_name%|$(couchjs_command_name)|g" \
< $< > $@
@@ -55,6 +57,7 @@ default_dev.ini: default.ini.tpl
-e "s|%localbuilddatadir%|$(abs_top_builddir)/share|g" \
-e "s|%localstatelibdir%|$(abs_top_builddir)/tmp/lib|g" \
-e "s|%localstatelogdir%|$(abs_top_builddir)/tmp/log|g" \
+ -e "s|%localstaterundir%|$(abs_top_builddir)/tmp/run|g" \
-e "s|%couchprivlibdir%|$(devcouchprivlibdir)|g" \
-e "s|%couchjs_command_name%|$(couchjs_dev_command_name)|g" \
< $< > $@
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in
index 409bfe98..ef5e4fba 100644
--- a/etc/couchdb/default.ini.tpl.in
+++ b/etc/couchdb/default.ini.tpl.in
@@ -11,22 +11,32 @@ max_attachment_chunk_size = 4294967296 ; 4GB
os_process_timeout = 5000 ; 5 seconds. for view and external servers.
max_dbs_open = 100
delayed_commits = true ; set this to false to ensure an fsync before 201 Created is returned
-batch_save_size = 1000 ; number of docs at which to save a batch
-batch_save_interval = 1000 ; milliseconds after which to save batches
+uri_file = %localstaterundir%/couch.uri
[httpd]
port = 5984
bind_address = 127.0.0.1
+max_connections = 2048
authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
default_handler = {couch_httpd_db, handle_request}
+secure_rewrites = true
+vhost_global_handlers = _utils, _uuids, _session, _oauth, _users
+allow_jsonp = false
+
+[ssl]
+port = 6984
[log]
file = %localstatelogdir%/couch.log
level = info
+include_sasl = true
[couch_httpd_auth]
-authentication_db = users
+authentication_db = _users
+authentication_redirect = /_utils/session.html
require_valid_user = false
+timeout = 43200 ; (default to 12 hours) number of seconds before automatic logout
+auth_cache_size = 50 ; size is number of cache entries
[query_servers]
javascript = %bindir%/%couchjs_command_name% %localbuilddatadir%/server/main.js
@@ -36,11 +46,7 @@ javascript = %bindir%/%couchjs_command_name% %localbuilddatadir%/server/main.js
; please let us know on the mailing list so we can fine tune the heuristic.
[query_server_config]
reduce_limit = true
-
-; enable external as an httpd handler, then link it with commands here.
-; note, this api is still under consideration.
-; [external]
-; mykey = /path/to/mycommand
+os_process_limit = 25
[daemons]
view_manager={couch_view, start_link, []}
@@ -51,6 +57,10 @@ httpd={couch_httpd, start_link, []}
stats_aggregator={couch_stats_aggregator, start, []}
stats_collector={couch_stats_collector, start, []}
uuids={couch_uuids, start, []}
+auth_cache={couch_auth_cache, start_link, []}
+rep_db_changes_listener={couch_rep_db_listener, start_link, []}
+vhosts={couch_httpd_vhost, start_link, []}
+os_daemons={couch_os_daemons, start_link, []}
[httpd_global_handlers]
/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
@@ -65,7 +75,6 @@ _uuids = {couch_httpd_misc_handlers, handle_uuids_req}
_restart = {couch_httpd_misc_handlers, handle_restart_req}
_stats = {couch_httpd_stats_handlers, handle_stats_req}
_log = {couch_httpd_misc_handlers, handle_log_req}
-_sleep = {couch_httpd_misc_handlers, handle_sleep_req}
_session = {couch_httpd_auth, handle_session_req}
_oauth = {couch_httpd_oauth, handle_oauth_req}
@@ -87,8 +96,21 @@ _view = {couch_httpd_view, handle_view_req}
_show = {couch_httpd_show, handle_doc_show_req}
_list = {couch_httpd_show, handle_view_list_req}
_info = {couch_httpd_db, handle_design_info_req}
+_rewrite = {couch_httpd_rewrite, handle_rewrite_req}
_update = {couch_httpd_show, handle_doc_update_req}
+; enable external as an httpd handler, then link it with commands here.
+; note, this api is still under consideration.
+; [external]
+; mykey = /path/to/mycommand
+
+; Here you can setup commands for CouchDB to manage
+; while it is alive. It will attempt to keep each command
+; alive if it exits.
+; [os_daemons]
+; some_daemon_name = /path/to/script -with args
+
+
[uuids]
; Known algorithms:
; random - 128 bits of random awesome
@@ -99,7 +121,7 @@ _update = {couch_httpd_show, handle_doc_update_req}
; random prefix is regenerated and the process starts over.
; utc_random - Time since Jan 1, 1970 UTC with microseconds
; First 14 characters are the time in hex. Last 18 are random.
-algorithm = random
+algorithm = sequential
[stats]
; rate is in milliseconds
@@ -107,3 +129,17 @@ rate = 1000
; sample intervals are in seconds
samples = [0, 60, 300, 900]
+[attachments]
+compression_level = 8 ; from 1 (lowest, fastest) to 9 (highest, slowest), 0 to disable compression
+compressible_types = text/*, application/javascript, application/json, application/xml
+
+[replicator]
+db = _replicator
+max_http_sessions = 10
+max_http_pipeline_size = 10
+; set to true to validate peer certificates
+verify_ssl_certificates = false
+; file containing a list of peer trusted certificates (PEM format)
+; ssl_trusted_certificates_file = /etc/ssl/certs/ca-certificates.crt
+; maximum peer certificate depth (must be set even if certificate validation is off)
+ssl_certificate_max_depth = 3
diff --git a/etc/couchdb/local.ini b/etc/couchdb/local.ini
index 96fcdc76..1c4060ab 100644
--- a/etc/couchdb/local.ini
+++ b/etc/couchdb/local.ini
@@ -13,9 +13,49 @@
; Uncomment next line to trigger basic-auth popup on unauthorized requests.
;WWW-Authenticate = Basic realm="administrator"
+; Uncomment next line to set the configuration modification whitelist. Only
+; whitelisted values may be changed via the /_config URLs. To allow the admin
+; to change this value over HTTP, remember to include {httpd,config_whitelist}
+; itself. Excluding it from the list would require editing this file to update
+; the whitelist.
+;config_whitelist = [{httpd,config_whitelist}, {log,level}, {etc,etc}]
+
+[httpd_global_handlers]
+;_google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}
+
+[couch_httpd_auth]
+; If you set this to true, you should also uncomment the WWW-Authenticate line
+; above. If you don't configure a WWW-Authenticate header, CouchDB will send
+; Basic realm="server" in order to prevent you getting logged out.
+; require_valid_user = false
+
[log]
;level = debug
+[os_daemons]
+; For any commands listed here, CouchDB will attempt to ensure that
+; the process remains alive while CouchDB runs as well as shut them
+; down when CouchDB exits.
+;foo = /path/to/command -with args
+
+[daemons]
+; enable SSL support by uncommenting the following line and supply the PEM's below.
+; the default ssl port CouchDB listens on is 6984
+; httpsd = {couch_httpd, start_link, [https]}
+
+[ssl]
+;cert_file = /full/path/to/server_cert.pem
+;key_file = /full/path/to/server_key.pem
+
+; To enable Virtual Hosts in CouchDB, add a vhost = path directive. All requests to
+; the Virual Host will be redirected to the path. In the example below all requests
+; to http://example.com/ are redirected to /database.
+; If you run CouchDB on a specific port, include the port number in the vhost:
+; example.com:5984 = /database
+
+[vhosts]
+;example.com = /database/
+
[update_notification]
;unique notifier name=/full/path/to/exe -with "cmd line arg"
diff --git a/etc/init/couchdb.tpl.in b/etc/init/couchdb.tpl.in
index 8afd5d62..3b8d17ea 100644
--- a/etc/init/couchdb.tpl.in
+++ b/etc/init/couchdb.tpl.in
@@ -141,7 +141,7 @@ parse_script_option_list () {
log_end_msg $SCRIPT_ERROR
fi
;;
- restart|force-reload)
+ restart)
log_daemon_msg "Restarting $DESCRIPTION" $NAME
if stop_couchdb; then
if start_couchdb; then
@@ -158,7 +158,7 @@ parse_script_option_list () {
;;
*)
cat << EOF >&2
-Usage: $SCRIPT_NAME {start|stop|restart|force-reload|status}
+Usage: $SCRIPT_NAME {start|stop|restart|status}
EOF
exit $SCRIPT_ERROR
;;
diff --git a/etc/windows/Makefile.am b/etc/windows/Makefile.am
new file mode 100644
index 00000000..5b4faae0
--- /dev/null
+++ b/etc/windows/Makefile.am
@@ -0,0 +1,13 @@
+## 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.
+
+## This file intentionally left blank.