diff --git a/README.md b/README.md index 1641818..136e795 100644 --- a/README.md +++ b/README.md @@ -377,6 +377,45 @@ Enable SSL on nginx (Accept all information asked): sudo certbot --nginx ``` +## Upgrading + +WhaTicket is a working in progress and we are adding new features frequently. To update your old installation and get all the new features, you can use a bash script like this: + +**Note**: Always check the .env.example and adjust your .env file before upgrading, since some new variable may be added. + +```bash +nano updateWhaticket +``` + +```bash +#!/bin/bash +echo "Updating Whaticket, please wait." + +cd ~ +cd whaticket +git pull +cd backend +npm install +rm -rf dist +npm run build +npx sequelize db:migrate +npx sequelize db:seed +cd ../frontend +npm install +rm -rf build +npm run build +pm2 restart all + +echo "Update finished. Enjoy!" +``` + +Make it executable and run it: + +```bash +chmod +x updateWhaticket +./updateWhaticket +``` + ## Contributing Any help and suggestions are welcome!