python -m venv venv
pip install -r requirements.txt
pre-commit install
gunicorn -w 4 -b 0.0.0.0:8000 app:app
docker build --force-rm -t flask-app .
docker run --rm -p 8000:8000 flask-app
Pytest with logs:
pytest -s -v
To check pre-commit status:
pre-commit run --all-files
Might change depending on the OS, but the idea is to freeze requirements starting from the pip inside venv folder:
.\venv\Scripts\pip3 freeze > requirements.txt
docker run -p 5432:5432 -v /tmp/database:/var/lib/postgresql/data -e POSTGRES_PASSWORD=1234 -d postgres