-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgunicorn.py
35 lines (25 loc) · 853 Bytes
/
gunicorn.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os as _os, sys as _sys
_HOME = _os.environ.get("TRJ_HOME")
if _HOME is None:
print("Environment variable TRJ_HOME not set. Exiting.")
_sys.exit( 1 )
# IP and port to bind to.
bind = ['127.0.0.1:4003']
# Maximum number of pending connections.
backlog = 2048
# Number of worker processes to handle connections.
workers = 2
# Fork main process to background.
daemon = True
# PID file to write to.
pidfile = _os.path.join(_HOME, "web.gunicorn.pid")
# Allow connections from any frontend proxy.
# forwarded_allow_ips = '*'
# Logging configuration.
accesslog = _os.path.join(_HOME, "web.gunicorn.access.log")
errorlog = _os.path.join(_HOME, "web.gunicorn.error.log")
loglevel = "warning"
# Gunicorn process name.
proc_name = "trajectory-gunicorn"
# Path to source directory.
pythonpath = _os.path.join(_HOME, "src", "main", "python")