mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-27 07:50:16 +00:00
Zipline: Add new ENV Variable and Change Update (#3997)
* Rework Zipline * Rework Zipline * Add changes * Add changes * Add changes * Add changes
This commit is contained in:
parent
0bab7c06a6
commit
d28f33eb91
@ -40,10 +40,12 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Updating ${APP} to ${RELEASE}"
|
msg_info "Updating ${APP} to ${RELEASE}"
|
||||||
cp /opt/zipline/.env /opt/
|
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")
|
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
|
unzip -q v"${RELEASE}".zip
|
||||||
mv zipline-${RELEASE} /opt/zipline
|
rm -R /opt/zipline
|
||||||
|
mv zipline-"${RELEASE}" /opt/zipline
|
||||||
cd /opt/zipline
|
cd /opt/zipline
|
||||||
mv /opt/.env /opt/zipline/.env
|
mv /opt/.env /opt/zipline/.env
|
||||||
$STD pnpm install
|
$STD pnpm install
|
||||||
@ -56,7 +58,7 @@ function update_script() {
|
|||||||
msg_ok "Started ${APP}"
|
msg_ok "Started ${APP}"
|
||||||
|
|
||||||
msg_info "Cleaning Up"
|
msg_info "Cleaning Up"
|
||||||
rm -rf v${RELEASE}.zip
|
rm -rf v"${RELEASE}".zip
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
else
|
else
|
||||||
|
@ -53,8 +53,8 @@ msg_info "Installing Zipline (Patience)"
|
|||||||
cd /opt
|
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) }')
|
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")
|
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
|
unzip -q v"${RELEASE}".zip
|
||||||
mv zipline-${RELEASE} /opt/zipline
|
mv zipline-"${RELEASE}" /opt/zipline
|
||||||
cd /opt/zipline
|
cd /opt/zipline
|
||||||
cat <<EOF >/opt/zipline/.env
|
cat <<EOF >/opt/zipline/.env
|
||||||
DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME
|
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_HOSTNAME=0.0.0.0
|
||||||
CORE_PORT=3000
|
CORE_PORT=3000
|
||||||
CORE_RETURN_HTTPS=false
|
CORE_RETURN_HTTPS=false
|
||||||
|
DATASOURCE_TYPE=local
|
||||||
|
DATASOURCE_LOCAL_DIRECTORY=/opt/zipline-upload
|
||||||
EOF
|
EOF
|
||||||
|
mkdir -p /opt/zipline-upload
|
||||||
$STD pnpm install
|
$STD pnpm install
|
||||||
$STD pnpm build
|
$STD pnpm build
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user