Skip to content

Commit d28f33e

Browse files
Zipline: Add new ENV Variable and Change Update (#3997)
* Rework Zipline * Rework Zipline * Add changes * Add changes * Add changes * Add changes
1 parent 0bab7c0 commit d28f33e

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

ct/zipline.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ function update_script() {
4040

4141
msg_info "Updating ${APP} to ${RELEASE}"
4242
cp /opt/zipline/.env /opt/
43-
rm -R /opt/zipline
43+
mkdir -p /opt/zipline-upload
44+
cp -R /opt/zipline/upload/* /opt/zipline-upload/
4445
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")
45-
unzip -q v${RELEASE}.zip
46-
mv zipline-${RELEASE} /opt/zipline
46+
unzip -q v"${RELEASE}".zip
47+
rm -R /opt/zipline
48+
mv zipline-"${RELEASE}" /opt/zipline
4749
cd /opt/zipline
4850
mv /opt/.env /opt/zipline/.env
4951
$STD pnpm install
@@ -56,7 +58,7 @@ function update_script() {
5658
msg_ok "Started ${APP}"
5759

5860
msg_info "Cleaning Up"
59-
rm -rf v${RELEASE}.zip
61+
rm -rf v"${RELEASE}".zip
6062
msg_ok "Cleaned"
6163
msg_ok "Updated Successfully"
6264
else

install/zipline-install.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,19 @@ msg_info "Installing Zipline (Patience)"
5353
cd /opt
5454
RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
5555
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")
56-
unzip -q v${RELEASE}.zip
57-
mv zipline-${RELEASE} /opt/zipline
56+
unzip -q v"${RELEASE}".zip
57+
mv zipline-"${RELEASE}" /opt/zipline
5858
cd /opt/zipline
5959
cat <<EOF >/opt/zipline/.env
6060
DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME
6161
CORE_SECRET=$SECRET_KEY
6262
CORE_HOSTNAME=0.0.0.0
6363
CORE_PORT=3000
6464
CORE_RETURN_HTTPS=false
65+
DATASOURCE_TYPE=local
66+
DATASOURCE_LOCAL_DIRECTORY=/opt/zipline-upload
6567
EOF
68+
mkdir -p /opt/zipline-upload
6669
$STD pnpm install
6770
$STD pnpm build
6871
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"

0 commit comments

Comments
 (0)