This commit is contained in:
CanbiZ 2025-06-24 13:21:19 +02:00
commit 7919b2b4d2

View File

@ -14,20 +14,21 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y make git $STD apt-get install -y \
make \
git
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
NODE_MODULE="yarn" setup_nodejs NODE_MODULE="yarn" setup_nodejs
msg_info "Installing Notesnook (Patience)"
fetch_and_deploy_gh_release "notesnook" "streetwriters/notesnook" "tarball" fetch_and_deploy_gh_release "notesnook" "streetwriters/notesnook" "tarball"
msg_info "Configuring Notesnook (Patience)"
cd /opt/notesnook cd /opt/notesnook
export NODE_OPTIONS="--max-old-space-size=2560" export NODE_OPTIONS="--max-old-space-size=2560"
mkdir -p certs mkdir -p certs
$STD openssl req -x509 -newkey rsa:4096 -keyout certs/key.pem -out certs/cert.pem -days 365 -nodes -subj "/CN=localhost"
$STD npm install $STD npm install
$STD npm run build:web $STD npm run build:web
msg_ok "Installed Notesnook" msg_ok "Configured Notesnook"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/notesnook.service cat <<EOF >/etc/systemd/system/notesnook.service
@ -39,7 +40,7 @@ After=network-online.target
Type=simple Type=simple
User=root User=root
WorkingDirectory=/opt/notesnook WorkingDirectory=/opt/notesnook
ExecStart=/usr/bin/npx serve -l tcp://0.0.0.0:3000 apps/web/build --ssl-cert certs/cert.pem --ssl-key certs/key.pem ExecStart=/usr/bin/npx serve -l tcp://0.0.0.0:3000 apps/web/build
Restart=on-failure Restart=on-failure
[Install] [Install]