Skip to content

Run flask using production wsgi/http server #174

@lorenyu

Description

@lorenyu

Flask's built in web server is meant for development, not production (see https://flask.palletsprojects.com/en/2.3.x/deploying/) so we need to install an additional library to make it work in production. A few past projects used gunicorn so let's go with that

There are some notes on configuration and design in this 🔒 slack thread. tldr; we may want to consider len(os.sched_getaffinity(0)) * 2 for number of workers, hardcode number of threads (e.g. 4), and have some sort of override/flag for the command in docker-compose to bypass gunicorn when running locally.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions