3 # This is a simple startup script to run Citadel in a Docker container.
4 # If you know your way around Docker, you don't have to use it; feel free to do whatever you want.
5 # The container expects a persistent volume called "citadel-data" in which it will keep everything.
6 # The remainder of the container is ephermal and can be deleted at any time.
8 # If you want to keep your Citadel data in a specific directory on the host,
9 # set CTDL_VOL to "bind" and CTDL_DIR to the full pathname of that directory.
10 # This is what you want if you are switching from Easy Install to Docker.
13 #CTDL_DIR=/usr/local/citadel
15 # If you want to keep your Citadel data in a Docker volume,
16 # set CTDL_VOL to "volume" and CTDL_DIR to the name of the volume.
21 docker version >/dev/null 2>&1 || {
22 echo Docker engine is not installed on this host.
31 --mount type=${CTDL_VOL},source=${CTDL_DIR},target=/citadel-data \
34 # Explanation of the above options:
36 # --name citadel Create a container named "citadel"
37 # -it Run in the foreground
38 # --rm Delete the container when it exits
39 # --network host Bind directly to the host's network ports instead of creating a separate interface
40 # --mount This identifies where on the host our persistent Citadel database is found