summaryrefslogtreecommitdiff
path: root/packaging/docker
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/docker')
-rw-r--r--packaging/docker/base-debian:jessie/Dockerfile2
-rw-r--r--packaging/docker/catlfish-dev/Dockerfile6
-rwxr-xr-xpackaging/docker/catlfish-dev/start.sh10
3 files changed, 7 insertions, 11 deletions
diff --git a/packaging/docker/base-debian:jessie/Dockerfile b/packaging/docker/base-debian:jessie/Dockerfile
index dbd5d37..864c239 100644
--- a/packaging/docker/base-debian:jessie/Dockerfile
+++ b/packaging/docker/base-debian:jessie/Dockerfile
@@ -2,5 +2,3 @@ FROM debian:jessie
RUN apt-get update
RUN echo 'debconf debconf/frontend select noninteractive' | debconf-set-selections
RUN apt-get -y -q upgrade
-RUN apt-get -y -q install supervisor
-RUN mkdir -p /var/log/supervisor
diff --git a/packaging/docker/catlfish-dev/Dockerfile b/packaging/docker/catlfish-dev/Dockerfile
index 9897204..241c58d 100644
--- a/packaging/docker/catlfish-dev/Dockerfile
+++ b/packaging/docker/catlfish-dev/Dockerfile
@@ -63,14 +63,12 @@ RUN useradd --uid 147 --gid 147 catlfish
# /var/run/catlfish and not in /usr/local/etc/catlfish, so symlink.
RUN mkdir /var/run/catlfish
WORKDIR /var/run/catlfish
-RUN mkdir erlang_log sasl_log supervisord_log
+RUN mkdir erlang_log sasl_log merge_log
RUN chown -R catlfish:catlfish /var/run/catlfish
RUN ln -s /usr/local/etc/catlfish/catlfish.config /var/run/catlfish/
-# Run supervisord.
-ADD supervisord.conf /etc/supervisor/
ADD merge.sh /usr/local/catlfish/
ADD start.sh /var/run/catlfish/
WORKDIR /var/run/catlfish
USER catlfish
-CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
+ENTRYPOINT ["/var/run/catlfish/start.sh"]
diff --git a/packaging/docker/catlfish-dev/start.sh b/packaging/docker/catlfish-dev/start.sh
index d6e4281..8b3697d 100755
--- a/packaging/docker/catlfish-dev/start.sh
+++ b/packaging/docker/catlfish-dev/start.sh
@@ -1,11 +1,11 @@
#! /bin/sh
-role=$1; shift
-erlbase=$1; shift
-database=$1; shift
+role=$1; [ -n "$1" ] && shift
+erlbase=$1; [ -n "$1" ] && shift
+database=$1; [ -n "$1" ] && shift
case $role in
- frontend|storage|sign)
+ frontend|storage|signing)
$erlbase/bin/run_erl \
/var/run/catlfish/ \
/var/run/catlfish/erlang_log/ \
@@ -15,7 +15,7 @@ case $role in
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 300 3600 $database
+ $erlbase/merge.sh 60 3600 $database > merge_log/stdout 2> merge_log/stderr
;;
*)
echo "catlfish: unknown role: $role"