1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-03-08 13:19:05 +00:00

Fix Docmost: default upload size and saving data when updating (#2598)

This commit is contained in:
bvdberg01 2025-02-24 13:10:32 +01:00 committed by GitHub
parent ece3ad2b13
commit a03a1034de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -34,6 +34,7 @@ function update_script() {
msg_info "Updating ${APP} to v${RELEASE}" msg_info "Updating ${APP} to v${RELEASE}"
cp /opt/docmost/.env /opt/ cp /opt/docmost/.env /opt/
cp -r /opt/docmost/data /opt/
rm -rf /opt/docmost rm -rf /opt/docmost
temp_file=$(mktemp) temp_file=$(mktemp)
wget -q "https://github.com/docmost/docmost/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" wget -q "https://github.com/docmost/docmost/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file"
@ -41,6 +42,7 @@ function update_script() {
mv docmost-${RELEASE} /opt/docmost mv docmost-${RELEASE} /opt/docmost
cd /opt/docmost cd /opt/docmost
mv /opt/.env /opt/docmost/.env mv /opt/.env /opt/docmost/.env
mv /opt/data /opt/docmost/data
$STD pnpm install --force $STD pnpm install --force
$STD pnpm build $STD pnpm build
echo "${RELEASE}" >/opt/${APP}_version.txt echo "${RELEASE}" >/opt/${APP}_version.txt

View File

@ -61,8 +61,11 @@ tar -xzf "$temp_file"
mv docmost-${RELEASE} /opt/docmost mv docmost-${RELEASE} /opt/docmost
cd /opt/docmost cd /opt/docmost
mv .env.example .env mv .env.example .env
sed -i "s|APP_SECRET=.*|APP_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" /opt/docmost/.env mkdir data
sed -i "s|DATABASE_URL=.*|DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME|" /opt/docmost/.env sed -i -e "s|APP_SECRET=.*|APP_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" \
-e "s|DATABASE_URL=.*|DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME|" \
-e "s|FILE_UPLOAD_SIZE_LIMIT=.*|FILE_UPLOAD_SIZE_LIMIT=50mb|" \
/opt/docmost/.env
export NODE_OPTIONS="--max-old-space-size=2048" export NODE_OPTIONS="--max-old-space-size=2048"
$STD pnpm install $STD pnpm install
$STD pnpm build $STD pnpm build