diff --git a/README.md b/README.md index dde23cf..023e5ab 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,28 @@ Run command for genie_bot : python genie_bot.py prod ``` +# Running the Bot on AWS with PM2 +**1.** Connect to AWS EC2 Instance: +```sh + ssh -i "path/to/your-key-pair.pem" ubuntu@ec2-instance_ip +``` +**2.** Change the directory to the repo: +```sh + cd code-genie-bot +``` +**3.** Pull the changes on dev branch: +```sh + git pull origin dev +``` +**4.** Install the requirements (Its recommended to use virtual env): +```sh + pip install -r requirements.txt +``` +**5.** Run the bot using pm2 tool (make sure that it's installed globally on your EC2 instance): +```sh + pm2 restart code_genie_bot +``` +**Note**: To stop the bot run ```pm2 stop code_genie_bot``` ├── code-genie-bot \ │ # Package initialization \ @@ -62,3 +84,4 @@ Run command for genie_bot : ├ # Git ignore file \ ├ # requermint list \ ├ # readme +