X-Git-Url: https://code.citadel.org/?p=citadel-docker.git;a=blobdiff_plain;f=run-citadel.sh;fp=run-citadel.sh;h=6ff9a03a203f9f8ee137ca7d8e23f63b9239a86e;hp=41192966c46c0873758afe33425787e06aa55efa;hb=468759f5d6d26de920f6be16f6776607f99dafe3;hpb=fda5b37d1404c736c457952aaf22115cf412b317 diff --git a/run-citadel.sh b/run-citadel.sh index 4119296..6ff9a03 100755 --- a/run-citadel.sh +++ b/run-citadel.sh @@ -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: