docker-k8s-devops/chapter5/labs/flask-skeleton
hang 1b6bef2d4d add:file 2022-01-20 17:36:31 +08:00
..
.gitlab add:file 2022-01-20 17:36:31 +08:00
doc add:file 2022-01-20 17:36:31 +08:00
migrations add:file 2022-01-20 17:36:31 +08:00
scripts add:file 2022-01-20 17:36:31 +08:00
skeleton add:file 2022-01-20 17:36:31 +08:00
tests add:file 2022-01-20 17:36:31 +08:00
.coveragerc add:file 2022-01-20 17:36:31 +08:00
.gitignore add:file 2022-01-20 17:36:31 +08:00
.gitlab-ci.yml add:file 2022-01-20 17:36:31 +08:00
CONTRIBUTING.md add:file 2022-01-20 17:36:31 +08:00
Dockerfile add:file 2022-01-20 17:36:31 +08:00
LICENSE add:file 2022-01-20 17:36:31 +08:00
README.md add:file 2022-01-20 17:36:31 +08:00
manage.py add:file 2022-01-20 17:36:31 +08:00
requirements.txt add:file 2022-01-20 17:36:31 +08:00
test-requirements.txt add:file 2022-01-20 17:36:31 +08:00
tox.ini add:file 2022-01-20 17:36:31 +08:00

README.md

build status coverage report

Flask Skeleton

Flask starter project...

Quick Start

Basics

  1. Activate a virtualenv
  2. Install the requirements

Set Environment Variables

Update skeleton/server/config.py, and then run:

$ export APP_SETTINGS="skeleton.server.config.DevelopmentConfig"

or

$ export APP_SETTINGS="skeleton.server.config.ProductionConfig"

Create DB

$ python manage.py create_db
$ python manage.py db init
$ python manage.py db migrate
$ python manage.py create_admin
$ python manage.py create_data

Run the Application

$ python manage.py runserver

So access the application at the address http://localhost:5000/

Want to specify a different port?

$ python manage.py runserver -h 0.0.0.0 -p 8080

Testing1

$ tox