zxpower / reflaskr

Updated version of blog app Flaskr from Python tiny MVC framework Flask tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReFlaskr

Updated version of blog app Flaskr from Python tiny MVC framework Flask tutorial

by digiBlink

Installation

  1. Get it from here using ZIPball or cloning it by git:

    git clone https://github.com/zxpower/reflaskr.git

  2. Go into freshly created folder:

    cd reflaskr/src

  3. Create the database:

    sqlite3 /tmp/flaskr.db < schema.sql

  4. Run the app!

    python app.py or python3 app.py

  5. Open http://localhost:5000/ in your browser to test the site. Use admin as username and default as password to login to system.

To run the app correctly you will require following Python prerequisites installed:

Building and running Docker image

  1. 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

  2. Next you need to run your newly built container using:

    docker run --name reflaskr -d -p 8080:8080 reflaskr:latest

  3. 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.

Support

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!

About

Updated version of blog app Flaskr from Python tiny MVC framework Flask tutorial


Languages

Language:Python 33.4%Language:HTML 31.9%Language:Dockerfile 13.4%Language:CSS 12.0%Language:JavaScript 7.5%Language:Shell 1.9%