-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathgunicorn_config.py
More file actions
53 lines (46 loc) · 1.32 KB
/
Copy pathgunicorn_config.py
File metadata and controls
53 lines (46 loc) · 1.32 KB
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
49
50
51
52
53
"""
配置文件
运行:
gunicorn lite_auth_http.lite_auth_http.wsgi -c python:gunicorn_config
"""
import os
import config as lite_auth_config
bind = lite_auth_config.HTTP_LISTEN
proc_name = 'LiteAuthHttp'
pidfile = 'gunicorn.pid'
capture_output = True
workers = 3
worker_class = 'gevent'
# daemon = True
logconfig_dict = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(lite_auth_config.LOG_PATH, 'gunicorn.log'),
'maxBytes': lite_auth_config.LOG_MAX_BYTES,
'backupCount': lite_auth_config.LOG_BACKUP_COUNT,
},
'access': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(lite_auth_config.LOG_PATH, 'access.log'),
'maxBytes': lite_auth_config.LOG_MAX_BYTES,
'backupCount': lite_auth_config.LOG_BACKUP_COUNT,
},
},
'loggers': {
'gunicorn.error': {
'handlers': ['console'],
'level': 'INFO',
'propagate': False,
},
'gunicorn.access': {
'handlers': ['access'],
'level': 'INFO',
'propagate': False,
},
},
}