forked from randomknowledge/django-webvideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgunicorn.py.ini
48 lines (41 loc) · 962 Bytes
/
gunicorn.py.ini
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
36
37
38
39
40
41
42
43
44
45
46
47
48
# coding=utf-8
import os
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
RUN_DIR = os.path.abspath(
os.path.join(BASE_DIR, 'run')
)
LOG_DIR = os.path.abspath(
os.path.join(BASE_DIR, 'log')
)
if not os.path.exists(RUN_DIR):
os.makedirs(RUN_DIR)
if not os.path.exists(LOG_DIR):
os.makedirs(LOG_DIR)
bind = "unix:{0}".format(
os.path.abspath(
os.path.join(RUN_DIR, 'gunicorn.sock')
)
)
pidfile = os.path.abspath(
os.path.join(RUN_DIR, 'gunicorn.pid')
)
workers = 4
worker_class = 'gevent'
worker_connections = 1000
errorlog = os.path.abspath(
os.path.join(BASE_DIR, 'log', 'gunicorn.error.log')
)
accesslog = os.path.abspath(
os.path.join(BASE_DIR, 'log', 'gunicorn.access.log')
)
proc_name = 'webvideo_gunicorn'
pythonpath = ":".join((
os.path.abspath(
os.path.join(BASE_DIR, 'virtualenv')
),
os.path.abspath(
os.path.join(BASE_DIR)
),
))
preload_app = True
loglevel = "info"