Using an ovh ubuntu vps. Based on this video.
First ensure that gunicorn is in the project requirement:
# in the python venv
pip install gunicorn
pip freez > requirement.txt
/var/www directoryvirtualenv venvName
source ./venvName/bin/activate
pip install -r requirements.txt
If getting an error
externaly manage env...: try installing with./envName/bin/pip install -r requirements.text
json
http://ip {
reverse_proxy localhost:8000
}
caddy stop in the root directorysudo caddy start to run it with the new config filegunicorn app:app where the first app is the name of the python file with Flask object, and the second is the name of the Flask objectFlask object, and the second is the name of the Flask object.