Updated version of blog app Flaskr from Python tiny MVC framework Flask tutorial
by digiBlink
-
Get it from here using ZIPball or cloning it by git:
git clone https://github.com/zxpower/reflaskr.git
-
Go into freshly created folder:
cd reflaskr/src
-
Create the database:
sqlite3 /tmp/flaskr.db < schema.sql
-
Run the app!
python app.py
orpython3 app.py
-
Open http://localhost:5000/ in your browser to test the site. Use
admin
as username anddefault
as password to login to system.
To run the app correctly you will require following Python prerequisites installed:
-
You can run everything via Docker. First you need to build the image that can be done using script provided:
buildImage.sh
- will produce a local image -
Next you need to run your newly built container using:
docker run --name reflaskr -d -p 8080:8080 reflaskr:latest
-
Now you're able to access
reflaskr
by opening http://localhost:8080/.
Note - Docker image built is run as non-root
user for security measures. You can use it as blueprint for creating your own Docker images for running flask
in production. This article contains some hints on how the image is built and how it could be used or debugged.
If you run into any issues, visit project's issue page and report an issue.
This is free software so feel free to use it/modify it as you wish.
If you have any ideas for the next release make sure to post them here and mark them as feature-request
!