Update update scripts and process files
This commit is contained in:
parent
200e8ba89d
commit
6486dd7ca8
6 changed files with 62 additions and 11 deletions
25
update-backend.sh
Executable file
25
update-backend.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Load nvm
|
||||
. ~/.nvm/nvm.sh
|
||||
|
||||
# Stop current processes
|
||||
nvm use
|
||||
pm2 delete process-bot.json
|
||||
pm2 delete process-api.json
|
||||
|
||||
# Run update
|
||||
nvm use
|
||||
git pull
|
||||
npm ci
|
||||
|
||||
cd backend
|
||||
npm ci
|
||||
npm run build
|
||||
npm run migrate-prod
|
||||
|
||||
# Start processes again
|
||||
cd ..
|
||||
nvm use
|
||||
pm2 start process-bot.json
|
||||
pm2 start process-api.json
|
Loading…
Add table
Add a link
Reference in a new issue