chore: add update instruction to README

This commit is contained in:
canove
2020-10-26 12:10:30 -03:00
parent eb0921e40e
commit 8e655b89b1

View File

@@ -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!