allow mapping of upload dir as volume

pull/33/head
Christoph Scholz 5 years ago
parent 958ab841a1
commit 153e8342d9

@ -43,7 +43,7 @@ LABEL maintainer="ProcessOne <contact@process-one.net>" \
# Create directory structure and user for ejabberd
RUN addgroup ejabberd -g 9000 \
&& adduser -s /bin/sh -D -G ejabberd ejabberd -u 9000 \
&& mkdir -p /home/ejabberd/conf /home/ejabberd/database /home/ejabberd/logs \
&& mkdir -p /home/ejabberd/conf /home/ejabberd/database /home/ejabberd/logs /home/ejabberd/upload \
&& chown -R ejabberd:ejabberd /home/ejabberd
# Install required dependencies
@ -73,7 +73,7 @@ ADD --chown=ejabberd:ejabberd https://download.process-one.net/cacert.pem conf/c
# Setup runtime environment
USER ejabberd
VOLUME ["$HOME/database","$HOME/conf","$HOME/logs"]
VOLUME ["$HOME/database","$HOME/conf","$HOME/logs","$HOME/upload"]
EXPOSE 1883 4369-4399 5222 5269 5280 5443
ENTRYPOINT ["/home/ejabberd/bin/ejabberdctl"]

@ -105,6 +105,7 @@ Here are the volume you may want to map:
- /home/ejabberd/logs/: Directory containing log files
- /home/ejabberd/database/: Directory containing Mnesia database. You should back up or export the content of the directory to persistent storage (host storage, local storage, any storage plugin)
- /home/ejabberd/conf/: Directory containing configuration and certificates
- /home/ejabberd/upload/: Directory containing uploaded files. This should also be backed up.
All these files are owned by ejabberd user inside the container. Corresponding
UID:GID is 9000:9000. If you prefer bind mounts instead of docker volumes, then

Loading…
Cancel
Save