The run-citadel.sh script is being turned into a runtime harness for the container.
[citadel-docker.git] / run-citadel.sh
index 41192966c46c0873758afe33425787e06aa55efa..6ff9a03a203f9f8ee137ca7d8e23f63b9239a86e 100755 (executable)
@@ -5,12 +5,30 @@
 # The container expects a persistent volume called "citadel-data" in which it will keep everything.
 # The remainder of the container is ephermal and can be deleted at any time.
 
+# If you want to keep your Citadel data in a specific directory on the host,
+# set CTDL_VOL to "bind" and CTDL_DIR to the full pathname of that directory.
+# This is what you want if you are switching from Easy Install to Docker.
+#
+#CTDL_VOL=bind
+#CTDL_DIR=/usr/local/citadel
+
+# If you want to keep your Citadel data in a Docker volume,
+# set CTDL_VOL to "volume" and CTDL_DIR to the name of the volume.
+#
+CTDL_VOL=volume
+CTDL_DIR=citadel-data
+
+docker version >/dev/null 2>&1 || {
+       echo Docker engine is not installed on this host.
+       exit 1
+}
+
 exec docker run \
        --name citadel \
        -it \
        --rm \
        --network host \
-       --mount type=bind,source=/root/citadel/citadel,target=/citadel-data \
+       --mount type=${CTDL_VOL},source=${CTDL_DIR},target=/citadel-data \
        $*
 
 #      Explanation of the above options: