From 4437eeaf45289d900081c822e7d4c52360172cdc Mon Sep 17 00:00:00 2001 From: Henning Bocklage Date: Wed, 4 Nov 2020 08:56:24 +0100 Subject: [PATCH] Changed Install source to preloaded zip --- Dockerfile | 5 +++-- Dockerfile.arm32v7 | 5 +++-- Dockerfile.arm64v8 | 5 +++-- root/etc/cont-init.d/20-download | 32 ++++++++------------------------ root/etc/cont-init.d/40-install | 6 ++++-- 5 files changed, 21 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61db301..fb21b03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,10 +26,11 @@ RUN \ python3 && \ echo "**** setup directories ****" && \ mkdir /deem && \ - mkdir /downloads && \ - chown abc:abc /deem && \ + mkdir /deem/Music && \ rm -R /config && \ ln -sf /deem/.config/deemix /config && \ + ln -sf /downloads /deem/Music/deemix\ Music && \ + chown abc:abc /deem && \ echo "**** clean up ****" && \ rm -rf \ /root/.cache \ diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 32cde5b..cc925ba 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -36,10 +36,11 @@ RUN \ python3 && \ echo "**** setup directories ****" && \ mkdir /deem && \ - mkdir /downloads && \ - chown abc:abc /deem && \ + mkdir /deem/Music && \ rm -R /config && \ ln -sf /deem/.config/deemix /config && \ + ln -sf /downloads /deem/Music/deemix\ Music && \ + chown abc:abc /deem && \ echo "**** clean up ****" && \ rm -rf \ /root/.cache \ diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index b1b6441..b7c2485 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -37,10 +37,11 @@ RUN \ python3 && \ echo "**** setup directories ****" && \ mkdir /deem && \ - mkdir /downloads && \ - chown abc:abc /deem && \ + mkdir /deem/Music && \ rm -R /config && \ ln -sf /deem/.config/deemix /config && \ + ln -sf /downloads /deem/Music/deemix\ Music && \ + chown abc:abc /deem && \ echo "**** clean up ****" && \ rm -rf \ /root/.cache \ diff --git a/root/etc/cont-init.d/20-download b/root/etc/cont-init.d/20-download index e8e1afa..6fa941c 100644 --- a/root/etc/cont-init.d/20-download +++ b/root/etc/cont-init.d/20-download @@ -4,35 +4,19 @@ echo "[cont-init.d] Downloading and unpacking" if [ ! -f "/deemix/server.py" ]; then - echo "[cont-init.d] First start, cloning repo" + echo "[cont-init.d] First start, downloading repo" if [[ "${DEEZUI}" == "true" ]]; then echo "[cont-init.d] Using Deezloader UI" - git clone https://git.fuwafuwa.moe/RemixDev/deemix-pyweb.git /deemix - git clone https://git.fuwafuwa.moe/RemixDev/deezloader-deemix.git /deemix/webui + curl -L -o deemix_pyweb.zip http://gitlab.com/Bockiii/deemix-src/-/jobs/artifacts/master/download?job=dl_src + unzip -qq deemix_pyweb.zip -d / + rm -R /deemix/webui + mv /deezui /deemix/webui touch /deemix/updated else echo "[cont-init.d] Using Deemix UI" - git clone --recurse-submodules https://git.fuwafuwa.moe/RemixDev/deemix-pyweb.git /deemix + curl -L -o deemix_pyweb.zip http://gitlab.com/Bockiii/deemix-src/-/jobs/artifacts/master/download?job=dl_src + unzip -qq deemix_pyweb.zip -d / + rm -R /deezui touch /deemix/updated fi -else - cd /deemix - localv=$(git rev-parse HEAD) - remotev=$(git ls-remote https://git.fuwafuwa.moe/RemixDev/deemix-pyweb.git refs/heads/main | cut -c1-40) - if [ $localv = $remotev ]; then - echo -e "[cont-init.d] Latest Version. No update needed" - else - echo -e "[cont-init.d] Newer Version. Updating" - if [[ "${DEEZUI}" == "true" ]]; then - echo "[cont-init.d] Using Deezloader UI" - git pull - cd /deemix/webui - git pull - touch /deemix/updated - else - echo "[cont-init.d] Using Deemix UI" - git pull --recurse-submodules - touch /deemix/updated - fi - fi fi diff --git a/root/etc/cont-init.d/40-install b/root/etc/cont-init.d/40-install index fc7ec23..58bb974 100644 --- a/root/etc/cont-init.d/40-install +++ b/root/etc/cont-init.d/40-install @@ -24,5 +24,7 @@ if [ ${#ARL} -gt 10 ]; then fi # Fix misconfigured download locations. The container's download map is always /downloads. -jq '.downloadLocation = "/downloads"' /config/config.json > tmp.$$.json && mv tmp.$$.json /config/config.json -chown abc:abc /config/config.json \ No newline at end of file +if [ -f "/config/config.json" ]; then + jq '.downloadLocation = "/downloads"' /config/config.json > tmp.$$.json && mv tmp.$$.json /config/config.json + chown abc:abc /config/config.json +fi \ No newline at end of file