A simple boilerplate providing a complete setup to start a new flask project
To build the docker image, simply open a terminal and run the following command:
docker-compose buildTo run the image in a docker container, simply open a terminal and run the following command:
docker-compose up flaskdockerstarterkitThe project will be available on the following URI: http://127.0.0.1:5000
To run the image with the VSCode debugger please follow these steps:
- Run the command
docker-compose up debuggerin your terminal,debugpywill wait for the VSCode debugger to attach before running theflaskserver - Go to VSCode
Run and DebugSection - Select the
▶️button with the optionPython: Remote Attach
And the flask server will run successfully, happy debugging ! 🚀
To run the tests, please run the following command in your terminal:
docker-compose up test-runnerYou need to have a .env file containing all the keys and values required.
You can refer to the .env.example file
- Up and running
flaskserver - Containerized application
- Unit tests
- VSCode debugger with hot reload