Pand-Aid / pandaid-api

backend for Pand-Aid pandemic response app
3 stars 3 forks source link

Add Gunicorn Configuration File #14

Open bhgrant8 opened 4 years ago

bhgrant8 commented 4 years ago

Summary

Currently API is started with the following command:

https://github.com/Pand-Aid/pandaid-api/blob/323b4160169cc20904b25a304fbb497edb4e68da/Dockerfile#L15

Which is including command line flags for various gunicorn configurations

An alternative approach is to use a Configuration file: http://docs.gunicorn.org/en/latest/configure.html#configuration-file

Basic behavior example

Gunicorn provides list of settings which can be set here: http://docs.gunicorn.org/en/latest/settings.html

Here is some information regarding worker types and threads: http://docs.gunicorn.org/en/latest/design.html

A model of use from Hack Oregon: https://github.com/hackoregon/2019-backend-docker/blob/master/gunicorn_conf.py

Motivation

This approach allows for setting more advanced options as well as easier documentation in the form of comments in file.

bhgrant8 commented 4 years ago

Moved to backlog, as not blocking development at moment.