Last active
March 20, 2021 13:32
-
-
Save K-Jay9/36e69beeaf9bc682d223e8555a7419e7 to your computer and use it in GitHub Desktop.
Revisions
-
K-Jay9 revised this gist
Mar 20, 2021 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,9 +15,9 @@ Install the required packages for creation of the app and the deployment using H $ pipenv install flask, autoenv, gunicorn ``` Create a file called Procfile and add the following line ``` web: gunicorn app:app ``` Create a Heroku app using the Heroku CLI ``` @@ -66,11 +66,11 @@ Create an env file using $ touch .env ``` Then add the following lines ``` pipenv shell export APP_SETTINGS="config.DevelopmentConfig" ``` We set the Heroku environment variable by running ``` -
K-Jay9 revised this gist
Mar 20, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -68,6 +68,7 @@ $ touch .env Then add the following lines pipenv shell export APP_SETTINGS="config.DevelopmentConfig" -
K-Jay9 revised this gist
Mar 20, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -72,7 +72,8 @@ export APP_SETTINGS="config.DevelopmentConfig" We set the Heroku environment variable by running ``` $ heroku config:set APP_SETTINGS=config.StagingConfig --remote stage ``` You can also go to Heroku deploy settings and set Autodeploy everytime the master branch or the github branch is updated -
K-Jay9 revised this gist
Mar 20, 2021 . 1 changed file with 15 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,35 +1,37 @@ ## Project setup Initialise your git repo in the working directory with ``` $ git init ``` Initialise your pipenv environment by running ``` $ pipenv shell ``` Install the required packages for creation of the app and the deployment using Heroku ``` $ pipenv install flask, autoenv, gunicorn ``` Create a file called Procfile and add the following line web: gunicorn app:app Create a Heroku app using the Heroku CLI ``` $ heroku login $ heroku create karomoweb-stage ``` Add the heroku remote to your git ``` $ git remote add stage [email protected]:karomoweb-stage.git ``` You can either connect Github to your Heroku app or using Heroku's remote to update your app Create a config.py file and add the following code ```python import os basedir = os.path.abspath(os.path.dirname(__file__)) @@ -58,11 +60,11 @@ class DevelopmentConfig(Config): class TestingConfig(Config): TESTING = True ``` Create an env file using ``` $ touch .env ``` Then add the following lines pipenv shell -
K-Jay9 renamed this gist
Mar 20, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
K-Jay9 revised this gist
Mar 20, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -73,3 +73,4 @@ We set the Heroku environment variable by running $ heroku config:set APP_SETTINGS=config.StagingConfig --remote stage You can also go to Heroku deploy settings and set Autodeploy everytime the master branch or the github branch is updated -
K-Jay9 revised this gist
Mar 20, 2021 . 1 changed file with 73 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,75 @@ ## Project setup Initialise your git repo in the working directory with $ git init Initialise your pipenv environment by running $ pipenv shell Install the required packages for creation of the app and the deployment using Heroku $ pipenv install flask, autoenv, gunicorn Create a file called Procfile and add the following line web: gunicorn app:app Create a Heroku app using the Heroku CLI $ heroku login $ heroku create karomoweb-stage Add the heroku remote to your git $ git remote add stage [email protected]:karomoweb-stage.git You can either connect Github to your Heroku app or using Heroku's remote to update your app Create a config.py file and add the following code import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False CSRF_ENABLED = True SECRET_KEY = 'this-really-needs-to-be-changed' class ProductionConfig(Config): DEBUG = False class StagingConfig(Config): DEVELOPMENT = True DEBUG = True class DevelopmentConfig(Config): DEVELOPMENT = True DEBUG = True class TestingConfig(Config): TESTING = True Create an env file using $ touch .env Then add the following lines pipenv shell export APP_SETTINGS="config.DevelopmentConfig" We set the Heroku environment variable by running $ heroku config:set APP_SETTINGS=config.StagingConfig --remote stage -
K-Jay9 created this gist
Mar 20, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ ## Project setup Initialise your git repo in the working directory with ```git git init ```