Refactor: BentoPDF (#12597)

* Refactor BentoPDF

* preserve .env.production if it exists

* Increase CPU cores to 2
This commit is contained in:
Chris
2026-03-05 12:53:15 -05:00
committed by GitHub
parent 5162f13372
commit 352716319f
3 changed files with 26 additions and 6 deletions

View File

@@ -19,8 +19,12 @@ fetch_and_deploy_gh_release "bentopdf" "alam00000/bentopdf" "tarball" "latest" "
msg_info "Setup BentoPDF"
cd /opt/bentopdf
$STD npm ci --no-audit --no-fund
$STD npm install http-server -g
cp ./.env.example ./.env.production
export NODE_OPTIONS="--max-old-space-size=3072"
export SIMPLE_MODE=true
$STD npm run build -- --mode production
export VITE_USE_CDN=true
$STD npm run build:all
msg_ok "Setup BentoPDF"
msg_info "Creating Service"
@@ -31,8 +35,8 @@ After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/bentopdf
ExecStart=/usr/bin/npx serve dist -p 8080
WorkingDirectory=/opt/bentopdf/dist
ExecStart=/usr/bin/npx http-server -g -b -d false -r --no-dotfiles
Restart=always
RestartSec=10