- html5-boilerplate for template
- peewee for orm and migration achieved
- docker & docker-compose integration
- per-commit & pytest & flake8 & black for workflow.
- gitlab-ci for deployment on vps
pip install cookiecutter
cookiecutter https://github.com/Colaplusice/cookiecutter-flask-devops.git or
cd ~/.cookiecutters/
git clone https://github.com/Colaplusice/cookiecutter-flask-devops.git
and you can cookiecutter cookiecutter-flask-devops
everywhere
- project_name :project name to generate
- app_name :app name
- create_api yes/no :whether to generate rest api
- vps_ssh :your vps ssh address like ubuntu@111.231.1.1
- database_username :database username,default is root
- database_password :database password
cookiecutter cookiecutter-flask-devops
# cd the project you just created
cd flask_project
# create database on you localhost
./boot.sh createdb flask_project
./boot.sh createdb flask_project_test
# unit test
pytest -s -x
# test run by docker-compose
docker-compose up
open http://localhost and you will see: