-
-
Notifications
You must be signed in to change notification settings - Fork 21
My rubbish Deploy script
Zenril edited this page Mar 4, 2019
·
4 revisions
You could just pull the latest version. and run it.
git pull origin master
npm install
node bot.js
but if the bot crashes it wont come back up
This is the script i'm using to deploy the latest stable version its pretty rubbish :D but gets the job done. https://gist.github.com/zenril/f2ae19f29cd0333f28b05ca520401408
- Linux
- Using nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
- You have the right version of node installed
nvm install v8.11.0
- You have installed forever.js globally
https://www.npmjs.com/package/forever
npm install forever -g
- You have ffmpeg installed
- Make a talkbot directory somewhere
mkdir ~/talkbot
- Clone talkbot into ~/talkbot as app
cd ~/talkbot
git clone [email protected]:wootosmash/talkbot.git app
- Copy the config folder from ~/talkbot/app/config - back into a ~/talkbot/shared directory.
mkdir ~/talkbot/shared
cp -r ~/talkbot/app/config ~/talk/shared/
4.Copy ~/talkbot/shared/config/auth.example.json to auth.json
cd ~/talkbot/shared/config
cp auth.example.json auth.json
5.Put your discord Bot token in ~/talkbot/shared/config/auth.json
6.Put your google auth API key in /root/.google/auth.json
7.Put the deploy script in ~/talkbot/deploy
The following script will
cd ~/talkbot
. deploy start
- Deletes the cloned app directory.
- Clones a new latest stable version into ./app so run the script from
~/talkbot
and it will clone to~/talkbot/app
- Delete ~/talkbot/app/config
- Create Symlink from
~/talkbot/shared/config/ to ~/talkbot/app/config
- Make sure the correct version of node is running.
- npm installs
- Runs the app '~/talkbot/app/bot.js
with
forever.js` which is a cronjob thing which will restart the bot if it crashes... and it does :D - Logs will be output to ~/talkbot/
- A custom footer