Merge pull request #33 from ChaosKid42/allow_upload_volume

allow mapping of upload dir as volume
pull/45/head
Christophe Romain 5 years ago committed by GitHub
commit fdd9061993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

@ -112,6 +112,7 @@ Here are the volume you may want to map:
- /home/ejabberd/logs/: Directory containing log files - /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/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/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 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 UID:GID is 9000:9000. If you prefer bind mounts instead of docker volumes, then

Loading…
Cancel
Save