diff options
author | Linus Nordberg <linus@nordberg.se> | 2015-04-13 17:07:39 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2015-04-13 17:07:39 +0200 |
commit | c468f3205045dc548fe7c4513021ad358d7ca09d (patch) | |
tree | 903d5a399ce3c4a98fe0a61e51a024c9f4616dda /packaging/docker/catlfish-dev | |
parent | 80bc94506980ac588e6bb1ce5e8021be21dec2fe (diff) |
fixup! WIPdocker-merge
Diffstat (limited to 'packaging/docker/catlfish-dev')
-rw-r--r-- | packaging/docker/catlfish-dev/Dockerfile | 6 | ||||
-rwxr-xr-x | packaging/docker/catlfish-dev/start.sh | 10 |
2 files changed, 7 insertions, 9 deletions
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" |