From f381d9f026c53e1d994aaef4261f314cc7ce4deb Mon Sep 17 00:00:00 2001 From: Andreas Balogh Date: Tue, 9 Feb 2021 21:33:01 +0100 Subject: [PATCH] added docker builder --- src/zeo/Dockerfile | 12 ++++++++++++ src/zeo/run.sh | 9 +++++++++ src/zeo/zeo.conf | 9 +++++++++ 3 files changed, 30 insertions(+) create mode 100644 src/zeo/Dockerfile create mode 100644 src/zeo/run.sh create mode 100644 src/zeo/zeo.conf diff --git a/src/zeo/Dockerfile b/src/zeo/Dockerfile new file mode 100644 index 0000000..c243f99 --- /dev/null +++ b/src/zeo/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.9-slim +RUN apt-get update && apt-get install -y \ + gcc \ + && rm -rf /var/lib/apt/lists/* +RUN pip install ZODB==5.6.0 +RUN pip install ZEO==5.2.1 +ADD ./zeo.conf /etc/zeo.conf +ADD ./run.sh /run.sh +RUN chmod +x /run.sh +VOLUME ["/var/zeo/fs", "/var/zeo/blobs"] +EXPOSE 8100 +CMD /run.sh \ No newline at end of file diff --git a/src/zeo/run.sh b/src/zeo/run.sh new file mode 100644 index 0000000..3102c2d --- /dev/null +++ b/src/zeo/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# We need to add a empty Data.fs if it does not exist +# as zeo will not start without on. +if [ ! -f /var/zeo/fs/Data.fs ]; then + touch /var/zeo/fs/Data.fs +fi + +exec /usr/local/bin/runzeo -a 8100 -C /etc/zeo.conf \ No newline at end of file diff --git a/src/zeo/zeo.conf b/src/zeo/zeo.conf new file mode 100644 index 0000000..2d9b5c8 --- /dev/null +++ b/src/zeo/zeo.conf @@ -0,0 +1,9 @@ + + address 8100 + read-only false + + + + path /var/zeo/fs/Data.fs + blob-dir /var/zeo/blobs + \ No newline at end of file