mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-08 06:57:37 +00:00
Compare commits
1 Commits
CrazyWolf1
...
michelroeg
Author | SHA1 | Date | |
---|---|---|---|
3745711cd9 |
@ -14,9 +14,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Fix unbound var in pulse.sh [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#5807](https://github.com/community-scripts/ProxmoxVE/pull/5807))
|
||||
- Refactor: Docmost [@tremor021](https://github.com/tremor021) ([#5806](https://github.com/community-scripts/ProxmoxVE/pull/5806))
|
||||
- Fix/stirling pdf script [@JcMinarro](https://github.com/JcMinarro) ([#5803](https://github.com/community-scripts/ProxmoxVE/pull/5803))
|
||||
- Fix/stirling pdf script [@JcMinarro](https://github.com/JcMinarro) ([#5803](https://github.com/community-scripts/ProxmoxVE/pull/5803))
|
||||
- gitea-mirror: update repo-url [@CrazyWolf13](https://github.com/CrazyWolf13) ([#5794](https://github.com/community-scripts/ProxmoxVE/pull/5794))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
@ -27,35 +27,48 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
if ! command -v node >/dev/null || [[ "$(/usr/bin/env node -v | grep -oP '^v\K[0-9]+')" != "22" ]]; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/docmost/docmost/main/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs
|
||||
msg_info "Installing Node.js 22"
|
||||
$STD apt-get purge -y nodejs
|
||||
rm -f /etc/apt/sources.list.d/nodesource.list
|
||||
rm -f /etc/apt/keyrings/nodesource.gpg
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
$STD npm install -g pnpm@10.4.0
|
||||
msg_ok "Node.js 22 installed"
|
||||
fi
|
||||
export NODE_OPTIONS="--max_old_space_size=4096"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/docmost/docmost/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat ~/.docmost 2>/dev/null)" ]] || [[ ! -f ~/.docmost ]]; then
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop docmost
|
||||
msg_ok "${APP} Stopped"
|
||||
|
||||
msg_info "Backing up data"
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cp /opt/docmost/.env /opt/
|
||||
cp -r /opt/docmost/data /opt/
|
||||
rm -rf /opt/docmost
|
||||
msg_ok "Data backed up"
|
||||
|
||||
fetch_and_deploy_gh_release "docmost" "docmost/docmost"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
temp_file=$(mktemp)
|
||||
curl -fsSL "https://github.com/docmost/docmost/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||
tar -xzf "$temp_file"
|
||||
mv docmost-${RELEASE} /opt/docmost
|
||||
cd /opt/docmost
|
||||
mv /opt/.env /opt/docmost/.env
|
||||
mv /opt/data /opt/docmost/data
|
||||
$STD pnpm install --force
|
||||
$STD pnpm build
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start docmost
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -f ${temp_file}
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
|
7
frontend/public/json/docmost.json
generated
7
frontend/public/json/docmost.json
generated
@ -31,10 +31,5 @@
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Use `cat ~/docmost.creds` to see database credentials.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
"notes": []
|
||||
}
|
||||
|
@ -24,13 +24,13 @@ RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/la
|
||||
curl -fsSL "https://github.com/steveiliop56/tinyauth/releases/download/v${RELEASE}/tinyauth-amd64" -o /opt/tinyauth/tinyauth
|
||||
chmod +x /opt/tinyauth/tinyauth
|
||||
|
||||
PASS=$(openssl rand -base64 8 | tr -dc 'a-zA-Z0-9' | head -c 8)
|
||||
USER=$(htpasswd -Bbn "tinyauth" "${PASS}")
|
||||
PASSWORD=$(openssl rand -base64 8 | tr -dc 'a-zA-Z0-9' | head -c 8)
|
||||
USER=$(htpasswd -Bbn "tinyauth" "${PASSWORD}")
|
||||
|
||||
cat <<EOF >/opt/tinyauth/credentials.txt
|
||||
cat <<EOF > /opt/tinyauth/credentials.txt
|
||||
Tinyauth Credentials
|
||||
Username: tinyauth
|
||||
Password: ${PASS}
|
||||
Password: ${PASSWORD}
|
||||
EOF
|
||||
|
||||
echo "${RELEASE}" >/opt/tinyauth_version.txt
|
||||
@ -82,9 +82,9 @@ chmod +x /etc/init.d/tinyauth
|
||||
$STD rc-update add tinyauth default
|
||||
msg_ok "Enabled Tinyauth Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Starting Tinyauth"
|
||||
$STD service tinyauth start
|
||||
msg_ok "Started Tinyauth"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
@ -22,7 +22,6 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/docmost/docmost/main/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs
|
||||
PG_VERSION="16" setup_postgresql
|
||||
fetch_and_deploy_gh_release "docmost" "docmost/docmost"
|
||||
|
||||
msg_info "Setting up PostgreSQL"
|
||||
DB_NAME="docmost_db"
|
||||
@ -41,7 +40,12 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||
} >>~/docmost.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
msg_info "Configuring Docmost (Patience)"
|
||||
msg_info "Installing Docmost (Patience)"
|
||||
temp_file=$(mktemp)
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/docmost/docmost/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/docmost/docmost/archive/refs/tags/v${RELEASE}.tar.gz" -o ""$temp_file""
|
||||
tar -xzf "$temp_file"
|
||||
mv docmost-${RELEASE} /opt/docmost
|
||||
cd /opt/docmost
|
||||
mv .env.example .env
|
||||
mkdir data
|
||||
@ -52,7 +56,8 @@ sed -i -e "s|APP_SECRET=.*|APP_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z
|
||||
export NODE_OPTIONS="--max-old-space-size=2048"
|
||||
$STD pnpm install
|
||||
$STD pnpm build
|
||||
msg_ok "Configured Docmost"
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Installed Docmost"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/docmost.service
|
||||
@ -76,6 +81,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f "$temp_file"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
Reference in New Issue
Block a user