A template project using docker and flask
Create a copy of .env.example and fill all the values and rename it as .env
- Install docker: sudo apt install docker.io
- Enable service: sudo systemctl enable docker
- Add user permissons: sudo usermod -aG docker $USER
- Activate changes to groups: newgrp docker
- Reboot your computer
- Verify all: docker run hello-world
- Using VS Code Run and Debug option.
- From VS Code terminal execute run_flask.sh script to start up the app using Flask Server
- From VS Code terminal execute run_gunicorn.sh script to start up the app using Gunicorn
Using a terminal just run flask
and cli commands will be listed.
flask loc
This command counts how many lines of code are there. It only check files with the following extensions:- .py
- .html
- .js
- .css
flask token
generates a 32 length secret token.