From c20a417f0f8262606712a9006703c7712ada7e9d Mon Sep 17 00:00:00 2001 From: Ritesh Yadav <53623244+DARK-art108@users.noreply.github.com> Date: Tue, 27 Oct 2020 21:15:53 +0530 Subject: [PATCH 1/7] Create Heroku-Deployment.md --- Heroku-Deployment.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Heroku-Deployment.md diff --git a/Heroku-Deployment.md b/Heroku-Deployment.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Heroku-Deployment.md @@ -0,0 +1 @@ + From 31aa09445cb9d7eb8a9ca4ec3217f4e7f81de5c5 Mon Sep 17 00:00:00 2001 From: Ritesh Yadav <53623244+DARK-art108@users.noreply.github.com> Date: Tue, 27 Oct 2020 22:14:43 +0530 Subject: [PATCH 2/7] Update and rename Heroku-Deployment.md to Instruction for Heroku Deployment.md --- Heroku-Deployment.md | 1 - Instruction for Heroku Deployment.md | 57 ++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) delete mode 100644 Heroku-Deployment.md create mode 100644 Instruction for Heroku Deployment.md diff --git a/Heroku-Deployment.md b/Heroku-Deployment.md deleted file mode 100644 index 8b13789..0000000 --- a/Heroku-Deployment.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Instruction for Heroku Deployment.md b/Instruction for Heroku Deployment.md new file mode 100644 index 0000000..9d4aa66 --- /dev/null +++ b/Instruction for Heroku Deployment.md @@ -0,0 +1,57 @@ +# How to deploy the web app to Heroku + +**Step 1.** For deploying the vms web app to heroku, you will need heroku cli. + + For Installing Heroku CLI refer to this [Heroku Installation Documentation](https://devcenter.heroku.com/articles/heroku-cli) for different installation methods. + + +**Step 2.** Create Procfile for Heroku Deployment + + You will need to create a Procfile which will provide the instruction for Heroku Deployment,make sure Procfile should be created inside the `vms` directory. + + Procfile should look like: + + ``` + web: gunicorn vms.wsgi --log-file - + ``` + +**Step 3.** Edit the requirements.txt file + + Add `gunicorn` inside the requirements.txt below all packages. + +**Step 4.** Create a .env file which is same as .env.example + +**Step 5.** Run the following cmd's to deploy the web app to heroku. + + ``` + $ git init + $ heroku git:clone -a vms-r + $ git add . + $ git commit -m "commits" + $ git push heroku master + $ heroku ps:scale web=1 + ``` + Check logs using `heroku logs --tail` + + **Note:** vms-r is the name of the web app created in the heroku for deployment. + + **Note:** Procfile and .env should be created inside main vms folder refer to below file structure. + + ``` + vms + |___ Procfile + |___ requirements.txt + |___ .env + |___ vms folder + |__ wsgi.py + |__ manage.py + |__ ...other files + + ``` + + + + + + + From dee040dde163cd9d9e9d996c64f6028e4e43308d Mon Sep 17 00:00:00 2001 From: Ritesh Yadav <53623244+DARK-art108@users.noreply.github.com> Date: Tue, 27 Oct 2020 22:18:58 +0530 Subject: [PATCH 3/7] Update Instruction for Heroku Deployment.md --- Instruction for Heroku Deployment.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Instruction for Heroku Deployment.md b/Instruction for Heroku Deployment.md index 9d4aa66..32c8b73 100644 --- a/Instruction for Heroku Deployment.md +++ b/Instruction for Heroku Deployment.md @@ -23,6 +23,8 @@ **Step 5.** Run the following cmd's to deploy the web app to heroku. + **Note:** Make sure you are inside `vms/vms` directory during deployment process + ``` $ git init $ heroku git:clone -a vms-r @@ -42,11 +44,12 @@ |___ Procfile |___ requirements.txt |___ .env - |___ vms folder - |__ wsgi.py - |__ manage.py - |__ ...other files - + |___ vms + | |__ wsgi.py + | |__ manage.py + | |__ ...other files + | + |__ ...other files ``` From 8a3855907ac2e63a3059f6dba0a0f92555aba11d Mon Sep 17 00:00:00 2001 From: Ritesh Yadav <53623244+DARK-art108@users.noreply.github.com> Date: Tue, 27 Oct 2020 22:20:05 +0530 Subject: [PATCH 4/7] Update Instruction for Heroku Deployment.md --- Instruction for Heroku Deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Instruction for Heroku Deployment.md b/Instruction for Heroku Deployment.md index 32c8b73..59955ee 100644 --- a/Instruction for Heroku Deployment.md +++ b/Instruction for Heroku Deployment.md @@ -37,7 +37,7 @@ **Note:** vms-r is the name of the web app created in the heroku for deployment. - **Note:** Procfile and .env should be created inside main vms folder refer to below file structure. + **Note:** Procfile and .env should be created inside main vms folder as metioned in Step 2 refer to below file structure. ``` vms From 641ee3b2fd49f6c48c71218c075714a0d7fe5201 Mon Sep 17 00:00:00 2001 From: Ritesh Yadav <53623244+DARK-art108@users.noreply.github.com> Date: Tue, 27 Oct 2020 22:21:48 +0530 Subject: [PATCH 5/7] Update Instruction for Heroku Deployment.md --- Instruction for Heroku Deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Instruction for Heroku Deployment.md b/Instruction for Heroku Deployment.md index 59955ee..70d36f9 100644 --- a/Instruction for Heroku Deployment.md +++ b/Instruction for Heroku Deployment.md @@ -46,7 +46,7 @@ |___ .env |___ vms | |__ wsgi.py - | |__ manage.py + | |__ utils.py | |__ ...other files | |__ ...other files From 9a74b4caa8c99b05b5a63ff842fd8f16c44c4498 Mon Sep 17 00:00:00 2001 From: Ritesh Yadav <53623244+DARK-art108@users.noreply.github.com> Date: Wed, 28 Oct 2020 14:27:45 +0530 Subject: [PATCH 6/7] Create Procfile --- vms/Procfile | 1 + 1 file changed, 1 insertion(+) create mode 100644 vms/Procfile diff --git a/vms/Procfile b/vms/Procfile new file mode 100644 index 0000000..8654934 --- /dev/null +++ b/vms/Procfile @@ -0,0 +1 @@ +web: gunicorn vms.wsgi --log-file - From 47856a5817292a8e01b596401d8ba300728fd33b Mon Sep 17 00:00:00 2001 From: Ritesh Yadav <53623244+DARK-art108@users.noreply.github.com> Date: Wed, 28 Oct 2020 14:28:21 +0530 Subject: [PATCH 7/7] Update requirements.txt --- requirements.txt | Bin 1256 -> 640 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/requirements.txt b/requirements.txt index 63bdef925a924752531cae7a5cc35f7c1b9e1592..38c84a22b97768443a9a87b2fd01ed6e158378cb 100644 GIT binary patch literal 640 zcmYjOF>>255bQa_rw~JsQX&^9GUG`V&!}DSgzSwspx&Q_xUF1ba_NN)?$Y}Q#InfLpFo}FRS0hTDAJHlzn0WogGQVkh^@7!#2 YyHdm7Ph`oNWn!l+J1)-jKDx5_03dk0}hR5Ko$L@!+wPf>p53egO5yt24W=A68;sPe_=l2Ez&r?6P4u z)ehZfm{x*U0ZUZwon#f$X}hz8Tbz1^Zpd_lIN7WVhrA4KTJHszBK#gI(wyyM=_Pm2 zA;U1-Lsp!sn@-*C5CQm7Xe4K?oI||vaZd_(QbVWpOB~&7RMwbE<7l_PL>Xd<+@&n! z!Rz8ag#(7tyB4&!RO#+oMRq&!UDVKG4hOpLbg-++&F*xS^5r`l!FO)Hu~5;A+{=?Z zwr+ARoG#sV@G(anc4ZsTZ1TjrNz^Cmn>Stkuy-c~{5>iE@PeM