From d28f33eb916239a5c0f13c8feb8078cf9f6ebd0b Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Wed, 23 Apr 2025 14:34:22 +0200 Subject: [PATCH] Zipline: Add new ENV Variable and Change Update (#3997) * Rework Zipline * Rework Zipline * Add changes * Add changes * Add changes * Add changes --- ct/zipline.sh | 10 ++++++---- install/zipline-install.sh | 7 +++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ct/zipline.sh b/ct/zipline.sh index 9df0a110d..781b14999 100644 --- a/ct/zipline.sh +++ b/ct/zipline.sh @@ -40,10 +40,12 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" cp /opt/zipline/.env /opt/ - rm -R /opt/zipline + mkdir -p /opt/zipline-upload + cp -R /opt/zipline/upload/* /opt/zipline-upload/ curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") - unzip -q v${RELEASE}.zip - mv zipline-${RELEASE} /opt/zipline + unzip -q v"${RELEASE}".zip + rm -R /opt/zipline + mv zipline-"${RELEASE}" /opt/zipline cd /opt/zipline mv /opt/.env /opt/zipline/.env $STD pnpm install @@ -56,7 +58,7 @@ function update_script() { msg_ok "Started ${APP}" msg_info "Cleaning Up" - rm -rf v${RELEASE}.zip + rm -rf v"${RELEASE}".zip msg_ok "Cleaned" msg_ok "Updated Successfully" else diff --git a/install/zipline-install.sh b/install/zipline-install.sh index c88958bfe..9e4b16497 100644 --- a/install/zipline-install.sh +++ b/install/zipline-install.sh @@ -53,8 +53,8 @@ msg_info "Installing Zipline (Patience)" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") -unzip -q v${RELEASE}.zip -mv zipline-${RELEASE} /opt/zipline +unzip -q v"${RELEASE}".zip +mv zipline-"${RELEASE}" /opt/zipline cd /opt/zipline cat </opt/zipline/.env DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME @@ -62,7 +62,10 @@ CORE_SECRET=$SECRET_KEY CORE_HOSTNAME=0.0.0.0 CORE_PORT=3000 CORE_RETURN_HTTPS=false +DATASOURCE_TYPE=local +DATASOURCE_LOCAL_DIRECTORY=/opt/zipline-upload EOF +mkdir -p /opt/zipline-upload $STD pnpm install $STD pnpm build echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"