From 11cfd3e5b0de9759b1a0e4f2abef26b9f056fc46 Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Sat, 20 Jun 2020 04:58:34 +0100 Subject: [PATCH] Update Home Panel to v2.9.1 Restructure and use new method to get app --- home-panel/Dockerfile | 17 ++++------------- home-panel/rootfs/etc/cont-init.d/secrets.sh | 4 ++-- home-panel/rootfs/etc/services.d/home-panel/run | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/home-panel/Dockerfile b/home-panel/Dockerfile index 8eee28c..85f687a 100755 --- a/home-panel/Dockerfile +++ b/home-panel/Dockerfile @@ -9,30 +9,21 @@ COPY rootfs / # hadolint ignore=DL3003 RUN \ apk add --no-cache --virtual .build-dependencies \ - git=2.26.2-r0 \ tar=1.32-r1 \ \ && apk add --no-cache \ nginx=1.18.0-r0 \ nodejs-current=14.3.0-r0 \ openssl=1.1.1g-r0 \ - yarn=1.19.2-r0 \ + yarn=1.22.4-r0 \ \ - && git clone --branch "v2.9.1" --depth=1 \ - "https://github.com/timmo001/home-panel.git" /tmp/api \ - && mv /tmp/api/api /opt/panel \ - \ - && mkdir -p /tmp/panel \ - && curl -J -L -o /tmp/panel.zip \ - "https://github.com/timmo001/home-panel/releases/download/v2.9.1/home-panel-built.zip" \ - && unzip -d /tmp/panel /tmp/panel.zip \ - && mv /tmp/panel/build/* /opt/panel/public \ + && mkdir -p /opt/panel \ + && curl -L -s "https://github.com/timmo001/home-panel/releases/download/v2.9.6/home-panel.tar.gz" \ + | tar zxvf - -C /opt/panel \ \ && cd /opt/panel \ && yarn install \ - && yarn compile \ \ - && yarn cache clean \ && apk del --purge .build-dependencies \ && rm -fr /tmp/* diff --git a/home-panel/rootfs/etc/cont-init.d/secrets.sh b/home-panel/rootfs/etc/cont-init.d/secrets.sh index 89c9707..c89cc97 100644 --- a/home-panel/rootfs/etc/cont-init.d/secrets.sh +++ b/home-panel/rootfs/etc/cont-init.d/secrets.sh @@ -15,8 +15,8 @@ key=$(cat /data/secret.txt) # Set secret to persistent secret file bashio::log.info "Update secret in config" -sed -i "s#API_AUTH_SECRET#${key}#g" /opt/panel/config/default.json +sed -i "s#API_AUTH_SECRET#${key}#g" /opt/panel/backend/config/default.json # Set database to /data bashio::log.info "Update database path in config" -sed -i "s#../db#/data#g" /opt/panel/config/default.json +sed -i "s#../db#/data#g" /opt/panel/backend/config/default.json diff --git a/home-panel/rootfs/etc/services.d/home-panel/run b/home-panel/rootfs/etc/services.d/home-panel/run index 08c786b..269699e 100644 --- a/home-panel/rootfs/etc/services.d/home-panel/run +++ b/home-panel/rootfs/etc/services.d/home-panel/run @@ -12,4 +12,4 @@ SUPPRESS_URL="true" export SUPPRESS_URL -exec node lib/ +exec yarn run start-precompiled