Push changes from local machine to github. (Or create a pull request and wait until change has been pulled)
git commit -m 'Always include a description message in your commits'
git push
Open chatbot SSH through Google Cloud Platform Compute Engine page.
Select window using tmux.
tmux
After starting, press Control+b then 's' to see active sessions and select appropriate sesstion.
Control+c to stop the running bot.
Navigate to bot folder, if not already:
cd chatbot/gpt3_chatbot
Pull latest repo from git
git pull
Upload any new credentials to chatbot/gpt3_chatbot/api_keys. Delete any obsolete credentials.
Verify requirements are up to date
pip3 install -r requirements.txt
If this is a new deployment ensure the proper API_keys are in the api_keys folder. You may need to create this folder. Use the upload feature in the top left of the SSH session.
Set up ngrok tunnel to listen on port 8000
./ngrok http 8000
In another tmux window Restart the server
gunicorn -b 0.0.0.0:8000 main:app
Make sure Facebook messenger is pointing to the ngrok tunnel:
Use another tmux session to check for any new errors or create the error log if it doesn't exist
vim logs/errors/errorlog.txt
File structure should look like this: