Skip to content

Base project to work with the Python Flask framework. It includes all the deployment with Docker in development and production environment, a functional user login, a basic frontend template, scripts needed for the generation of SSL certificates from Let's Encrypt and much more!

Notifications You must be signed in to change notification settings

diverso-lab/flask_boilerplate

Repository files navigation

Pytest Testing Suite Commits Syntax Checker

flask_boilerplate

Base project to work with the Python Flask framework in an easy way.

Set .env file in root with:

Create an .env file in the root of the project with this information.

cp .env.docker.example .env

Deploy in develop

To deploy the software under development environment, run:

docker compose -f docker/docker-compose.dev.yml up -d 

This will apply the migrations to the database and run the Flask application. Open http://localhost to play with your fantastic app!

Migrations

However, if during development there are new changes in the model, run inside the web_app_container container:

flask db migrate
flask db upgrade

Tests

To run unit test, please enter inside web_app_container container:

rosemary test

Deploy in production (Docker Compose)

docker compose -f docker/docker-compose.prod.yml up -d 

About

Base project to work with the Python Flask framework. It includes all the deployment with Docker in development and production environment, a functional user login, a basic frontend template, scripts needed for the generation of SSL certificates from Let's Encrypt and much more!

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published