summaryrefslogtreecommitdiff
path: root/packaging/docker/catlfish-dev/start.sh
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-04-13 14:19:38 +0200
committerLinus Nordberg <linus@nordberg.se>2015-04-13 17:11:07 +0200
commitcf6e64bf94677092ef94a6f4ed7c1391dcd43f23 (patch)
tree903d5a399ce3c4a98fe0a61e51a024c9f4616dda /packaging/docker/catlfish-dev/start.sh
parent2e7ae73196da22dcf9b4817fc38861774ff61b84 (diff)
Run all types of nodes from the same docker image.
Diffstat (limited to 'packaging/docker/catlfish-dev/start.sh')
-rwxr-xr-xpackaging/docker/catlfish-dev/start.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/packaging/docker/catlfish-dev/start.sh b/packaging/docker/catlfish-dev/start.sh
new file mode 100755
index 0000000..8b3697d
--- /dev/null
+++ b/packaging/docker/catlfish-dev/start.sh
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+role=$1; [ -n "$1" ] && shift
+erlbase=$1; [ -n "$1" ] && shift
+database=$1; [ -n "$1" ] && shift
+
+case $role in
+ frontend|storage|signing)
+ $erlbase/bin/run_erl \
+ /var/run/catlfish/ \
+ /var/run/catlfish/erlang_log/ \
+ "exec $erlbase/bin/erl -config catlfish"
+ ;;
+ merge)
+ ERL_LIBS=$erlbase/lib/catlfish-0.6.0-dev.ez/catlfish-0.6.0-dev
+ ERL_LIBS=$ERL_LIBS:$erlbase/lib/lager-2.1.1.ez/lager-2.1.1
+ export ERL_LIBS
+ $erlbase/merge.sh 60 3600 $database > merge_log/stdout 2> merge_log/stderr
+ ;;
+ *)
+ echo "catlfish: unknown role: $role"
+esac