Update
GIT
Update the application sources with the command:
$ cd /opt/lebontag-v2 && git pull
$ sudo dos2unix /opt/lebontag-v2/scripts/*.sh && sudo chmod +x /opt/lebontag-v2/scripts/*.sh
$ sudo dos2unix /opt/lebontag-v2/cron/*.sh && sudo chmod +x /opt/lebontag-v2/cron/*.sh
Packages
Install any new Node.js packages with the command:
$ npm install
Database
Apply the changes to the /sql/update_X.Y.Z_to_X.Y.Z.sql files in order from your previous version.
Note: if you have several versions to update, run the version jumps in order.
Application
Run the following command to stop the service and clear the application cache:
$ pm2 stop LeBonTagv2 && rm -R /opt/lebontag-v2/.next/ && npm cache clean --force
Start recompiling the application:
$ npm run lint && npm run build --omit=dev
Restart the service:
$ pm2 restart LeBonTagv2 --update-env