From 8e655b89b1d02f54716d1204bf743ab19121e767 Mon Sep 17 00:00:00 2001 From: canove Date: Mon, 26 Oct 2020 12:10:30 -0300 Subject: [PATCH] chore: add update instruction to README --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) 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!