mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-13 07:10:51 +02:00
Compare commits
5 Commits
2025-02-16
...
2025-02-17
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54929e4b0d | ||
|
|
ca20d52ac1 | ||
|
|
e22a6dad6f | ||
|
|
ee84468498 | ||
|
|
746f19b0b8 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -17,6 +17,18 @@ All LXC instances created using this repository come pre-installed with Midnight
|
|||||||
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
||||||
|
|
||||||
|
|
||||||
|
## 2025-02-17
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
### 💥 Breaking Changes
|
||||||
|
|
||||||
|
- Zipline: Prepare for Version 4.0.0 [@MickLesk](https://github.com/MickLesk) ([#2455](https://github.com/community-scripts/ProxmoxVE/pull/2455))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Fix: Zipline increase SECRET to 42 chars [@V1d1o7](https://github.com/V1d1o7) ([#2444](https://github.com/community-scripts/ProxmoxVE/pull/2444))
|
||||||
|
|
||||||
## 2025-02-16
|
## 2025-02-16
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|||||||
@@ -26,6 +26,12 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
if ! command -v pnpm &>/dev/null; then
|
||||||
|
msg_info "Installing pnpm"
|
||||||
|
#export NODE_OPTIONS=--openssl-legacy-provider
|
||||||
|
npm install -g pnpm@latest &>/dev/null
|
||||||
|
msg_ok "Installed pnpm"
|
||||||
|
fi
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -s https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
msg_info "Stopping ${APP}"
|
msg_info "Stopping ${APP}"
|
||||||
@@ -40,8 +46,8 @@ function update_script() {
|
|||||||
mv zipline-${RELEASE} /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
|
||||||
yarn install &>/dev/null
|
pnpm install &>/dev/null
|
||||||
yarn build &>/dev/null
|
pnpm build &>/dev/null
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated ${APP}"
|
||||||
|
|
||||||
@@ -66,4 +72,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||||
|
|||||||
@@ -33,14 +33,14 @@ msg_ok "Set up Node.js Repository"
|
|||||||
msg_info "Installing Node.js"
|
msg_info "Installing Node.js"
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y nodejs
|
$STD apt-get install -y nodejs
|
||||||
$STD npm install -g yarn
|
$STD npm install -g pnpm
|
||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL"
|
msg_info "Setting up PostgreSQL"
|
||||||
DB_NAME=ziplinedb
|
DB_NAME=ziplinedb
|
||||||
DB_USER=zipline
|
DB_USER=zipline
|
||||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
||||||
SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
SECRET_KEY="$(openssl rand -base64 42 | tr -dc 'a-zA-Z0-9')"
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||||
@@ -60,13 +60,15 @@ wget -q "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
|
||||||
mv .env.local.example .env
|
cat <<EOF >/opt/zipline/.env
|
||||||
sudo sed -i "s|CORE_SECRET=.*|CORE_SECRET=\"$SECRET_KEY\"|" /opt/zipline/.env
|
DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME
|
||||||
sudo sed -i "s|CORE_RETURN_HTTPS=.*|CORE_RETURN_HTTPS=false|" /opt/zipline/.env
|
CORE_SECRET=$SECRET_KEY
|
||||||
sudo sed -i "s|CORE_DATABASE_URL=.*|CORE_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" /opt/zipline/.env
|
CORE_HOSTNAME=0.0.0.0
|
||||||
|
CORE_PORT=3000
|
||||||
CORE_RETURN_HTTPS=false
|
CORE_RETURN_HTTPS=false
|
||||||
$STD yarn install
|
EOF
|
||||||
$STD yarn build
|
$STD pnpm install
|
||||||
|
$STD pnpm build
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
msg_ok "Installed Zipline"
|
msg_ok "Installed Zipline"
|
||||||
|
|
||||||
@@ -78,19 +80,18 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/zipline
|
WorkingDirectory=/opt/zipline
|
||||||
ExecStart=/usr/bin/yarn start
|
ExecStart=/usr/bin/pnpm start
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now zipline.service
|
systemctl enable -q --now zipline
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|||||||
Reference in New Issue
Block a user