Changed Install source to preloaded zip

This commit is contained in:
Henning Bocklage 2020-11-04 08:56:24 +01:00
parent e49d8e14a9
commit 4437eeaf45
5 changed files with 21 additions and 32 deletions

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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

View File

@ -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
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