Fix update_script

This commit is contained in:
pespinel 2026-02-17 21:39:39 +01:00
parent 30b03aa9db
commit 16267af541

View File

@ -30,11 +30,25 @@ function update_script() {
NODE_VERSION="24" setup_nodejs NODE_VERSION="24" setup_nodejs
msg_info "Updating strapi" msg_info "Stopping ${APP}"
systemctl stop strapi
msg_ok "Stopped ${APP}"
msg_info "Updating ${APP}"
cd /opt/strapi cd /opt/strapi
$STD npm install
msg_ok "Updated ${APP}"
msg_info "Building ${APP}"
export NODE_OPTIONS="--max-old-space-size=3072"
$STD npm run build $STD npm run build
systemctl restart strapi msg_ok "Built ${APP}"
msg_ok "Updated successfully!"
msg_info "Starting ${APP}"
systemctl start strapi
msg_ok "Started ${APP}"
msg_ok "Update completed successfully!"
exit exit
} }