This section explains how to deploy the application on a production server running inside an LXC container.
- App Server (
vitrinecontainer): Runs the Flask app via Gunicorn. - Proxy Server (
proxy-apachecontainer): Runs Apache and forwards requests to the Flask app. It is out-of-scope for this document.
- Python >=3.9
- pip >= 23.0
- Create and activate the virtual environment as
venv:
python3 -m venv venv
source venv/bin/activate- Install the requirements:
pip install -r requirements.txt- Run gunicorn:
nohup gunicorn --bind 0.0.0.0:8000 wsgi:app > gunicorn.log 2>&1 &