From cb9a35cb2b643b472cf46ac055a1bf64eb6404bc Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Fri, 8 Nov 2024 18:44:30 +0100 Subject: [PATCH] docs: add update instructions --- docs/deployment/pm2-nginx.md | 14 +++++++++++++- docs/deployment/svrjs.md | 12 +++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/deployment/pm2-nginx.md b/docs/deployment/pm2-nginx.md index 7820d23..89c6151 100644 --- a/docs/deployment/pm2-nginx.md +++ b/docs/deployment/pm2-nginx.md @@ -78,4 +78,16 @@ sudo ln -s /etc/nginx/sites-available/mernmail /etc/nginx/sites-enabled/mernmail ## 6. Restart NGINX -Restart NGINX using either `sudo systemctl restart nginx` or `sudo /etc/init.d/nginx restart` command. \ No newline at end of file +Restart NGINX using either `sudo systemctl restart nginx` or `sudo /etc/init.d/nginx restart` command. + +## Updating MERNMail + +To update the MERNMail webmail application, run these commands: + +```bash +cd ~/mernmail +git pull +npm run build +``` + +After updating MERNMail, restart MERNMail using the `pm2 restart "MERNMail"` command. \ No newline at end of file diff --git a/docs/deployment/svrjs.md b/docs/deployment/svrjs.md index efc509e..8014471 100644 --- a/docs/deployment/svrjs.md +++ b/docs/deployment/svrjs.md @@ -78,4 +78,14 @@ cp dist/mod.js /usr/lib/svrjs/mods/mernmail.js ## 6. Restart SVR.JS -Restart SVR.JS using either `sudo systemctl restart svrjs` or `sudo /etc/init.d/svrjs restart` command. \ No newline at end of file +Restart SVR.JS using either `sudo systemctl restart svrjs` or `sudo /etc/init.d/svrjs restart` command. + +## Updating MERNMail + +To update the MERNMail webmail application, run this command: + +```bash +sudo runuser svrjs -s /bin/bash -c 'cd /var/lib/mernmail && git pull && npm install && npm run build' +``` + +After updating MERNMail, restart SVR.JS using either `sudo systemctl restart svrjs` or `sudo /etc/init.d/svrjs restart` command. \ No newline at end of file