Skip to content
Permalink
Browse files

fix bind-mounting of /etc/duplicacy

  • Loading branch information...
ehough committed Jan 24, 2019
1 parent c083df6 commit c376c4c630ced9b5002700688a62d68d9df622fb
Showing with 33 additions and 11 deletions.
  1. +1 −1 .dockerignore
  2. +4 −4 Dockerfile
  3. +28 −0 entrypoint.sh
  4. +0 −1 files/etc/duplicacy/duplicacy.json
  5. +0 −5 files/etc/duplicacy/settings.json
@@ -1,2 +1,2 @@
*
!files
!entrypoint.sh
@@ -40,8 +40,7 @@ RUN ARCHITECTURE=linux_x64
mkdir -p \
${_DIR_CACHE}/repositories \
${_DIR_CACHE}/stats \
${_DIR_WEB}/bin \
${_DIR_CONF}/filters && \
${_DIR_WEB}/bin && \
\
# duplicacy_web expects to find the CLI binary in a certain location
# https://forum.duplicacy.com/t/run-web-ui-in-a-docker-container/1505/2
@@ -53,12 +52,13 @@ RUN ARCHITECTURE=linux_x64
# stage the rest of the web directory
ln -s ${_DIR_CONF}/settings.json ${_DIR_WEB}/settings.json && \
ln -s ${_DIR_CONF}/duplicacy.json ${_DIR_WEB}/duplicacy.json && \
ln -s ${_DIR_CONF}/licenses.json ${_DIR_WEB}/licenses.json && \
ln -s ${_DIR_CONF}/filters ${_DIR_WEB}/filters && \
ln -s ${_DIR_CACHE}/stats ${_DIR_WEB}/stats

EXPOSE 3875
ENTRYPOINT [ "/usr/local/bin/duplicacy_web" ]
CMD [ "/usr/local/bin/entrypoint.sh" ]

COPY ./files/ /
COPY entrypoint.sh /usr/local/bin/entrypoint.sh

VOLUME ["/var/cache/duplicacy", "/etc/duplicacy"]
@@ -0,0 +1,28 @@
#!/bin/sh

set -e

cd /etc/duplicacy

if [ ! -f duplicacy.json ]; then
echo '{}' > duplicacy.json
fi

if [ ! -f licenses.json ]; then
echo '{}' > licenses.json
fi

if [ ! -f settings.json ]; then

echo '{
"listening_address" : ":3875",
"temporary_directory" : "/var/cache/duplicacy/repositories",
"log_directory" : "/var/log"
}' > settings.json
fi

# make the filters directory, if it doesn't already exist
mkdir -p filters

# switch to duplicacy_web
exec /usr/local/bin/duplicacy_web

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

0 comments on commit c376c4c

Please sign in to comment.
You can’t perform that action at this time.