Permalink
Browse files

upgrade rcouch templates to sync with latest rcouch changes

  • Loading branch information...
1 parent b66e398 commit 708b390b92394ff3832e6169fa4107c2bc2acf1b @benoitc benoitc committed May 7, 2012
View
2 NOTICE
@@ -1,7 +1,7 @@
rcouch_template
---------------
-2011 (c) Benoît Chesneau <benoitc@e-engura.org>
+2011-2012 (c) Benoît Chesneau <benoitc@e-engura.org>
rcouch_template is released under the Apache 2 license. See the LICENSE file for
the complete license.
View
2 rcouch.gitignore
@@ -37,4 +37,4 @@ apps/couch/share/server/main-coffee.js
deps
ebin
distdir
-package/osxbuild
+package/packages
View
37 rcouch.rebar.config
@@ -1,36 +1,25 @@
-%%-*- mode: erlang -*-
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
-{deps, [
+{lib_dirs, ["deps/couch_core"]}.
+{sub_dirs, ["rel", "deps/couch_core/apps/*"]}.
- %% apache couchdb core
- {couch, ".*", {git, "git://github.com/refuge/couch.git",
- {branch, "master"}}},
- %% couch index manager
- {couch_index, ".*", {git, "git://github.com/refuge/couch_index.git",
- {branch, "master"}}},
+{deps, [
- %% couch map/reduce indexer
- {couch_mrview, ".*", {git, "git://github.com/refuge/couch_mrview.git",
- {branch, "master"}}},
+ %% apache couchdb core
+ {couch_core, ".*", {git, "git://github.com/refuge/couch_core.git",
+ {branch, "master"}}},
- %% couch changes api handler
- {couch_changes, ".*", {git, "git://github.com/refuge/couch_changes.git",
+ %% couch random doc handler
+ {couch_randomdoc, ".*", {git, "git://github.com/refuge/couch_randomdoc.git",
{branch, master}}},
- %% couch replicator
- {couch_replicator, ".*", {git, "git://github.com/refuge/couch_replicator.git",
- {branch, "master"}}},
+ %% spatial indexer
+ {refuge_spatial, ".*", {git, "git://github.com/refuge/refuge_spatial.git",
+ {branch, master}}}
- %% spatial indexer
- {geocouch, ".*", {git, "git://github.com/refuge/geocouch.git",
- {branch, master}}},
- %% couch random doc handler
- {couch_randomdoc, ".*", {git, "git://github.com/refuge/couch_randomdoc.git",
- {branch, master}}}
]}.
-{sub_dirs, ["rel"]}.
-
{require_otp_vsn, "R14|R15"}.
View
39 rcouch.rebar_embed.config
@@ -1,36 +1,25 @@
-%%-*- mode: erlang -*-
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
-{deps, [
+{lib_dirs, ["deps/couch_core"]}.
+{sub_dirs, ["rel", "deps/couch_core/apps/*",
+ "apps/{{appid}}"]}.
- %% apache couchdb core
- {couch, ".*", {git, "git://github.com/refuge/couch.git",
- {branch, "master"}}},
- %% couch index manager
- {couch_index, ".*", {git, "git://github.com/refuge/couch_index.git",
- {branch, "master"}}},
+{deps, [
- %% couch map/reduce indexer
- {couch_mrview, ".*", {git, "git://github.com/refuge/couch_mrview.git",
- {branch, "master"}}},
+ %% apache couchdb core
+ {couch_core, ".*", {git, "git://github.com/refuge/couch_core.git",
+ {branch, "master"}}},
- %% couch changes api handler
- {couch_changes, ".*", {git, "git://github.com/refuge/couch_changes.git",
+ %% couch random doc handler
+ {couch_randomdoc, ".*", {git, "git://github.com/refuge/couch_randomdoc.git",
{branch, master}}},
- %% couch replicator
- {couch_replicator, ".*", {git, "git://github.com/refuge/couch_replicator.git",
- {branch, "master"}}},
+ %% spatial indexer
+ {refuge_spatial, ".*", {git, "git://github.com/refuge/refuge_spatial.git",
+ {branch, master}}}
- %% spatial indexer
- {geocouch, ".*", {git, "git://github.com/refuge/geocouch.git",
- {branch, master}}},
-
- %% couch random doc handler
- {couch_randomdoc, ".*", {git, "git://github.com/refuge/couch_randomdoc.git",
- {branch, master}}}
]}.
-{sub_dirs, ["rel", "apps/{{appid}}"]}.
-
{require_otp_vsn, "R14|R15"}.
View
17 rcouch.rel/files/app.config
@@ -2,11 +2,24 @@
%% ex: ft=erlang ts=4 sw=4 et
[
-
+
{couch, [
{config_dir, "{{platform_etc_dir}}"}
]},
+ {lager,
+ [{crash_log, "log/crash.log"},
+ {handlers,
+ [{lager_console_backend, info},
+ {lager_file_backend,
+ [{"log/error.log", error, 10485760, "$D0", 5},
+ {"log/console.log", info, 10485760, "$D0", 5},
+ {"log/debug.log", debug, 10485760, "$D0", 5}
+ ]}
+ ]}
+ ]},
+
+
%% os_mon config
{os_mon, [
{start_memsup, false},
@@ -22,6 +35,6 @@
{error_logger_mf_dir, "{{sasl_log_dir}}"}, % Log directory
{error_logger_mf_maxbytes, 10485760}, % 10 MB max file size
{error_logger_mf_maxfiles, 5} % 5 files max
- ]}
+ ]}
].
View
19 rcouch.rel/files/default.ini
@@ -60,6 +60,7 @@ require_valid_user = false
timeout = 600 ; number of seconds before automatic logout
auth_cache_size = 50 ; size is number of cache entries
allow_persistent_cookies = false ; set to true to allow persistent cookies
+iterations = 10000 ; iterations for password hashing
[couch_httpd_oauth]
; If set to 'true', oauth token and consumer secrets will be looked up
@@ -98,19 +99,14 @@ reduce_limit = true
os_process_limit = 25
[daemons]
-index_server={couch_index_server, start_link, []}
external_manager={couch_external_manager, start_link, []}
query_servers={couch_query_servers, start_link, []}
-vhosts={couch_httpd_vhost, start_link, []}
-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, []}
os_daemons={couch_os_daemons, start_link, []}
compaction_daemon={couch_compaction_daemon, start_link, []}
-
[httpd_global_handlers]
/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "{{platform_share_dir}}/www"}
@@ -127,14 +123,15 @@ _log = {couch_httpd_misc_handlers, handle_log_req}
_session = {couch_httpd_auth, handle_session_req}
_oauth = {couch_httpd_oauth, handle_oauth_req}
+
[httpd_db_handlers]
_all_docs = {couch_mrview_http, handle_all_docs_req}
-_changes = {couch_httpd_db, handle_changes_req}
+_changes = {couch_httpd_changes, handle_changes_req}
_compact = {couch_httpd_db, handle_compact_req}
_design = {couch_httpd_db, handle_design_req}
_temp_view = {couch_mrview_http, handle_temp_view_req}
_view_cleanup = {couch_mrview_http, handle_cleanup_req}
-_spatial_cleanup = {geocouch_http, handle_cleanup_req}
+_spatial_cleanup = {refuge_spatial_http, handle_cleanup_req}
_random_doc = {couch_randomdoc_httpd, handle_req}
; The external module takes an optional argument allowing you to narrow it to a
@@ -152,10 +149,10 @@ _show = {couch_mrview_show, handle_doc_show_req}
_update = {couch_mrview_show, handle_doc_update_req}
_view = {couch_mrview_http, handle_view_req}
_random = {couch_randomdoc_show, handle_randomdoc_show_req}
-_spatial = {geocouch_http, handle_spatial_req}
-_spatial/_list = {geocouch_show, handle_spatial_list_req}
-_spatial/_info = {geocouch_http, handle_info_req}
-_spatial/_compact = {geocouch_http, handle_compact_req}
+_spatial = {refuge_spatial_http, handle_spatial_req}
+_spatial/_list = {refuge_spatial_show, handle_spatial_list_req}
+_spatial/_info = {refuge_spatial_http, handle_info_req}
+_spatial/_compact = {refuge_spatial_http, handle_compact_req}
; enable external as an httpd handler, then link it with commands here.
; note, this api is still under consideration.
View
6 rcouch.rel/files/local.ini
@@ -44,12 +44,8 @@
; when stdin is closed.
;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]
+enable = false
;cert_file = /full/path/to/server_cert.pem
;key_file = /full/path/to/server_key.pem
;password = somepassword
View
6 rcouch.rel/files/rcouch
@@ -221,9 +221,11 @@ case "$1" in
# Start the VM
exec $CMD
;;
-
+ uris)
+ $NODETOOL rpc couch_httpd display_uris
+ ;;
*)
- echo "Usage: $SCRIPT {start|start_front|stop|restart|reboot|ping|console|console_clean|attach}"
+ echo "Usage: $SCRIPT {start|start_front|stop|restart|reboot|ping|console|console_clean|attach|uris}"
exit 1
;;
esac
View
BIN rcouch.rel/files/refuge_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 rcouch.rel/files/vm.args
@@ -2,14 +2,14 @@
-name {{node}}
## Cookie for distributed erlang
--setcookie {{appid}}
+-setcookie {{cookie}}
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
-heart
## Enable kernel poll and a few async threads
+K true
-+A 16
++A 16
## Treat error_logger warnings as warnings
+W w
View
1 rcouch.rel/rcouch.config
@@ -23,6 +23,7 @@
%% node
{node, "{{appid}}@127.0.0.1"}.
+{cookie, "{{appid}}"}.
{crash_dump, "log/erl_crash.dump"}.
{runner_script_dir, "$(cd ${0%/*} && pwd)"}.
View
19 rcouch.rel/reltool.config
@@ -2,7 +2,8 @@
%% ex: ft=erlang ts=4 sw=4 et
%%
{sys, [
- {lib_dirs, ["../deps", "../deps/geocouch/apps"]},
+ {lib_dirs, ["../deps", "../deps/refuge_spatial/apps",
+ "../deps/couch_core/apps"]},
{rel, "{{appid}}", "0.1",
[
kernel,
@@ -21,12 +22,13 @@
jiffy,
snappy,
couch,
+ couch_httpd,
couch_index,
couch_mrview,
couch_changes,
couch_replicator,
vtree,
- geocouch,
+ refuge_spatial,
couch_randomdoc
]},
{rel, "start_clean", "", [kernel, stdlib]},
@@ -39,12 +41,16 @@
{excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)"]},
{excl_archive_filters, [".*"]},
+
+
{app, sasl, [{incl_cond, include}]},
{app, crypto, [{incl_cond, include}]},
{app, public_key, [{incl_cond, include}]},
{app, ssl, [{incl_cond, include}]},
+ {app, xmerl, [{incl_cond, include}]},
%% dependencies
+ {app, lager, [{incl_cond, include}]},
{app, mochiweb, [{incl_cond, include}]},
{app, oauth, [{incl_cond, include}]},
{app, jiffy, [{incl_cond, include}]},
@@ -53,12 +59,13 @@
%% couchdb
{app, couch, [{incl_cond, include}]},
+ {app, couch_httpd, [{incl_cond, include}]},
{app, couch_index, [{incl_cond, include}]},
{app, couch_mrview, [{incl_cond, include}]},
{app, couch_changes, [{incl_cond, include}]},
{app, couch_replicator, [{incl_cond, include}]},
{app, vtree, [{incl_cond, include}]},
- {app, geocouch, [{incl_cond, include}]},
+ {app, refuge_spatial, [{incl_cond, include}]},
{app, couch_randomdoc, [{incl_cond, include}]}
]}.
@@ -77,6 +84,8 @@
{template, "files/vm.args", "etc/vm.args"},
{template, "files/default.ini", "etc/default.ini"},
{template, "files/local.ini", "etc/local.ini"},
- {copy, "../deps/couch/share"},
- {copy, "../deps/couch/couchjs", "bin/couchjs"}
+ {copy, "../deps/couch_core/apps/couch/share"},
+ {copy, "../deps/couch_core/apps/couch_httpd/share/www", "share/www"},
+ {copy, "../deps/couch_core/apps/couch/couchjs", "bin/couchjs"},
+ {copy, "files/refuge_logo.png", "share/www/image/logo.png"}
]}.
View
24 rcouch.rel/reltool_embed.config
@@ -2,7 +2,8 @@
%% ex: ft=erlang ts=4 sw=4 et
%%
{sys, [
- {lib_dirs, ["../apps", "../deps", "../deps/geocouch/apps"]},
+ {lib_dirs, ["../apps", "../deps", "../deps/refuge_spatial/apps",
+ "../deps/couch_core/apps"]},
{rel, "{{appid}}", "0.1",
[
kernel,
@@ -21,12 +22,13 @@
jiffy,
snappy,
couch,
+ couch_httpd,
couch_index,
couch_mrview,
couch_changes,
couch_replicator,
vtree,
- geocouch,
+ refuge_spatial,
couch_randomdoc,
{{appid}}
]},
@@ -40,12 +42,16 @@
{excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)"]},
{excl_archive_filters, [".*"]},
+
+
{app, sasl, [{incl_cond, include}]},
{app, crypto, [{incl_cond, include}]},
{app, public_key, [{incl_cond, include}]},
{app, ssl, [{incl_cond, include}]},
+ {app, xmerl, [{incl_cond, include}]},
%% dependencies
+ {app, lager, [{incl_cond, include}]},
{app, mochiweb, [{incl_cond, include}]},
{app, oauth, [{incl_cond, include}]},
{app, jiffy, [{incl_cond, include}]},
@@ -54,16 +60,18 @@
%% couchdb
{app, couch, [{incl_cond, include}]},
+ {app, couch_httpd, [{incl_cond, include}]},
{app, couch_index, [{incl_cond, include}]},
{app, couch_mrview, [{incl_cond, include}]},
- {app, couch_replicator, [{incl_cond, include}]},
{app, couch_changes, [{incl_cond, include}]},
+ {app, couch_replicator, [{incl_cond, include}]},
{app, vtree, [{incl_cond, include}]},
- {app, geocouch, [{incl_cond, include}]},
+ {app, refuge_spatial, [{incl_cond, include}]},
{app, couch_randomdoc, [{incl_cond, include}]},
%% {{appid}}
{app, {{appid}}, [{incl_cond, include}]}
+
]}.
{target_dir, "{{appid}}"}.
@@ -81,6 +89,8 @@
{template, "files/vm.args", "etc/vm.args"},
{template, "files/default.ini", "etc/default.ini"},
{template, "files/local.ini", "etc/local.ini"},
- {copy, "../deps/couch/share"},
- {copy, "../deps/couch/couchjs", "bin/couchjs"}
- ]}.
+ {copy, "../deps/couch_core/apps/couch/share"},
+ {copy, "../deps/couch_core/apps/couch_httpd/share/www", "share/www"},
+ {copy, "../deps/couch_core/apps/couch/couchjs", "bin/couchjs"},
+ {copy, "files/refuge_logo.png", "share/www/image/logo.png"}
+]}.
View
1 rcouch.template
@@ -26,3 +26,4 @@
{chmod, 8#744, "rel/files/nodetool"}.
{file, "rcouch.rel/files/app.config", "rel/files/app.config"}.
{template, "rcouch.rel/files/vm.args", "rel/files/vm.args"}.
+{file, "rcouch.rel/files/refuge_logo.png", "rel/files/refuge_logo.png"}.
View
1 rcouch_embed.template
@@ -31,3 +31,4 @@
{chmod, 8#744, "rel/files/nodetool"}.
{file, "rcouch.rel/files/app.config", "rel/files/app.config"}.
{template, "rcouch.rel/files/vm.args", "rel/files/vm.args"}.
+{file, "rcouch.rel/files/refuge_logo.png", "rel/files/refuge_logo.png"}.

0 comments on commit 708b390

Please sign in to comment.