summaryrefslogtreecommitdiff
path: root/packaging/docker
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-03-31 22:16:44 +0200
committerLinus Nordberg <linus@nordberg.se>2015-04-01 12:59:16 +0200
commit438df32d626adf53e834d14e50159ac725d829d9 (patch)
treecc5ced6bc1ac8385d499f0ea035b83841da58895 /packaging/docker
parent27c22937d8c9a91603eb17a986ae8ce80c95e36d (diff)
Don't daemonise beam; run in /var/run/catlfish; run as daemon.
Also, point out supervisord.conf, to be explicit. Also, log everything under /var/run/catlfish.
Diffstat (limited to 'packaging/docker')
-rw-r--r--packaging/docker/catlfish-dev/Dockerfile15
-rw-r--r--packaging/docker/catlfish-dev/supervisord.conf2
2 files changed, 11 insertions, 6 deletions
diff --git a/packaging/docker/catlfish-dev/Dockerfile b/packaging/docker/catlfish-dev/Dockerfile
index b3d19cb..9a95417 100644
--- a/packaging/docker/catlfish-dev/Dockerfile
+++ b/packaging/docker/catlfish-dev/Dockerfile
@@ -43,10 +43,15 @@ RUN make -C catlfish PREFIX=/usr/local/catlfish release
VOLUME /usr/local/catlfish
VOLUME /var/local/db/catlfish
-# Working directory is where catlfish.config is.
-WORKDIR /usr/local/etc/catlfish
+# Working directory is where catlfish.config is. We want to run in
+# /var/run/catlfish and not in /usr/local/etc/catlfish, so symlink.
+RUN mkdir /var/run/catlfish
+RUN ln -s /usr/local/etc/catlfish/catlfish.config /var/run/catlfish/
+WORKDIR /var/run/catlfish
-# Run supervisord. TODO: make log- and pidfile end up in
-# /var/run/catlfish
+# Don't run as root.
+USER daemon
+
+# Run supervisord.
ADD supervisord.conf /etc/supervisor/
-CMD ["/usr/bin/supervisord"]
+CMD ["/usr/bin/supervisord" "-c" "/etc/supervisor/supervisord.conf"]
diff --git a/packaging/docker/catlfish-dev/supervisord.conf b/packaging/docker/catlfish-dev/supervisord.conf
index 67c7b1d..8b317e0 100644
--- a/packaging/docker/catlfish-dev/supervisord.conf
+++ b/packaging/docker/catlfish-dev/supervisord.conf
@@ -2,4 +2,4 @@
nodaemon=true
[program:catlfish]
-command=/usr/local/catlfish/bin/run_erl -daemon /var/run/ /var/log/catlfish/ "exec /usr/local/catlfish/bin/erl -config catlfish"
+command=/usr/local/catlfish/bin/run_erl /var/run/catlfish/ /var/run/catlfish/erlang_log/ "exec /usr/local/catlfish/bin/erl -config catlfish"