diff options
| author | 2020-03-23 10:10:28 -0700 | |
|---|---|---|
| committer | 2020-03-23 10:33:00 -0700 | |
| commit | 58371bd3ffcb4805cd24a8f239dd941bbcac6571 (patch) | |
| tree | 99c09ba6c7ecbfd99d95d982614cdb195b1cc212 | |
| parent | Move snekbox.cfg to a config directory (diff) | |
Use a config file for gunicorn
This will make it easy to maintain a consistent config without relying
on invocation via pipenv.
| -rw-r--r-- | Pipfile | 10 | ||||
| -rw-r--r-- | config/gunicorn.conf.py | 5 | 
2 files changed, 6 insertions, 9 deletions
| @@ -55,15 +55,7 @@ testb = """          -c 'pipenv run coverage run -m unittest'  """  report = "coverage report" -snekbox = """ -    gunicorn \ -        -w 2 \ -        -b 0.0.0.0:8060 \ -        --logger-class snekbox.GunicornLogger \ -        --access-logformat '%(m)s %(U)s%(q)s %(s)s %(b)s %(L)ss' \ -        --access-logfile - \ -        snekbox.api.app -""" +snekbox = "gunicorn -c config/gunicorn.conf.py snekbox.api.app"  devsh = "sh scripts/dev.sh"  build = """      docker build \ diff --git a/config/gunicorn.conf.py b/config/gunicorn.conf.py new file mode 100644 index 0000000..5ab11f4 --- /dev/null +++ b/config/gunicorn.conf.py @@ -0,0 +1,5 @@ +workers = 2 +bind = "0.0.0.0:8060" +logger_class = "snekbox.GunicornLogger" +access_logformat = "%(m)s %(U)s%(q)s %(s)s %(b)s %(L)ss" +access_logfile = "-" | 
