Flask Framework

Gunicorn

  • Installation: pip install gunicorn

  • Run:

# equivalent to 'from hello import app', hello.py and app=flask()
$ gunicorn -w 4 'hello:app'
  • Bind on external IPs: gunicorn -w 4 -b 0.0.0.0 'hello:create_app()'

Reference

  • []How To Build and Deploy a Flask Application Using Docker on Ubuntu 20.04]https://www.digitalocean.com/community/tutorials/how-to-build-and-deploy-a-flask-application-using-docker-on-ubuntu-20-04)

Last updated