Simple Flask Web application based on the Clean Blog v5.0.10 Bootstrap theme by StartBootstrap and Jinja2 templating engine.
- Python v3.11.3
- Flask v2.2.3
- Jinja2 v3.1.2
- Bootstrap v4.5.3
- jQuery v3.5.1
The application is deployed on Heroku.
Live Demo: https://flask-app-thorin-and-company.herokuapp.com
- Login to Heroku:
$ heroku login
- Create a Heroku app:
For existing repositories, simply add the heroku remote (connect to remote).
$ heroku create example-app (or create using UI heroku)
- Connect Git remote to Heroku:
- By Heroku git URL ( URL can be obtained from the app's settings page on the Heroku):
$ git remote add heroku <heroku-git-url>
- By Heroku CLI and app name (full string can be obtained from the app's deploy page):
$ heroku git:remote -a example-app
- By Heroku git URL ( URL can be obtained from the app's settings page on the Heroku):
- Create requirements file:
$ pip freeze > requirements.txt
- Add gunicorn server to requirements:
$ echo "gunicorn" >> requirements.txt
- Create a Heroku Procfile:
- Run the flask app using built-in Flask development server (not recommended):
Requires app.run() code in the
app.py
script$ echo "web: python app.py" > Procfile
- Run the flask app using using the Gunicorn WSGI server (recommended for production environments):
$ echo "web: gunicorn app:app" > Procfile
- Run the flask app using built-in Flask development server (not recommended):
Requires app.run() code in the
- Commit all changes: Add Heroku settings
- Deploy:
$ git push heroku master
(or connect to GitHub using UI).
- Content: The Lord of the Rings Wiki
- Theme: StartBootstrap Clean Blog v5.0.10
- Code based on Code Institute walkthrough Project