File tree 4 files changed +25
-0
lines changed
4 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ EDXAPP_CMS_GUNICORN_EXTRA: ""
35
35
EDXAPP_CMS_GUNICORN_EXTRA_CONF : " "
36
36
EDXAPP_CMS_GUNICORN_TIMEOUT : 300
37
37
38
+ EDXAPP_USE_GUNICORN_SEPARATE_LOG_FILE : False
39
+
38
40
# Set this to the maximum number
39
41
# of requests for gunicorn for the lms and cms
40
42
# gunicorn --max-requests <num>
@@ -1113,6 +1115,9 @@ EDXAPP_COMPLETION_AGGREGATOR_URL: null
1113
1115
edxapp_data_dir : " {{ COMMON_DATA_DIR }}/edxapp"
1114
1116
edxapp_app_dir : " {{ COMMON_APP_DIR }}/edxapp"
1115
1117
edxapp_log_dir : " {{ COMMON_LOG_DIR }}/edx"
1118
+ edxapp_gunicorn_log_dir :
1119
+ - " {{ COMMON_LOG_DIR }}/gunicorn-lms"
1120
+ - " {{ COMMON_LOG_DIR }}/gunicorn-cms"
1116
1121
edxapp_venvs_dir : " {{ edxapp_app_dir }}/venvs"
1117
1122
edxapp_venv_dir : " {{ edxapp_venvs_dir }}/edxapp"
1118
1123
edxapp_venv_bin : " {{ edxapp_venv_dir }}/bin"
Original file line number Diff line number Diff line change 59
59
- install
60
60
- install:base
61
61
62
+ - name : create edxapp gunicorn log dirs
63
+ file :
64
+ path : " {{ item }}"
65
+ state : directory
66
+ owner : " {{ common_web_user }}"
67
+ group : " {{ common_web_user }}"
68
+ with_items :
69
+ - " {{ edxapp_gunicorn_log_dir }}"
70
+ tags :
71
+ - install
72
+ - install:base
73
+
62
74
- name : Ensure the tracking folder exists
63
75
file :
64
76
path : " {{ COMMON_LOG_DIR }}/tracking"
Original file line number Diff line number Diff line change @@ -51,4 +51,8 @@ export EDX_REST_API_CLIENT_NAME="{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }
51
51
52
52
source {{ edxapp_app_dir }}/edxapp_env
53
53
# We exec so that gunicorn is the child of supervisor and can be managed properly
54
+ {% if EDXAPP_USE_GUNICORN_SEPARATE_LOG_FILE %}
55
+ exec {{ executable }} -c {{ edxapp_app_dir }}/cms_gunicorn.py {{ EDXAPP_CMS_GUNICORN_EXTRA }} cms.wsgi --log-file {{ edxapp_gunicorn_log_dir[1] }}/edx.log
56
+ {% else %}
54
57
exec {{ executable }} -c {{ edxapp_app_dir }}/cms_gunicorn.py {{ EDXAPP_CMS_GUNICORN_EXTRA }} cms.wsgi
58
+ {% endif %}
Original file line number Diff line number Diff line change @@ -52,4 +52,8 @@ export EDX_REST_API_CLIENT_NAME="{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }
52
52
53
53
source {{ edxapp_app_dir }}/edxapp_env
54
54
# We exec so that gunicorn is the child of supervisor and can be managed properly
55
+ {% if EDXAPP_USE_GUNICORN_SEPARATE_LOG_FILE %}
56
+ exec {{ executable }} -c {{ edxapp_app_dir }}/lms_gunicorn.py lms.wsgi --log-file {{ edxapp_gunicorn_log_dir[0] }}/edx.log
57
+ {% else %}
55
58
exec {{ executable }} -c {{ edxapp_app_dir }}/lms_gunicorn.py lms.wsgi
59
+ {% endif %}
You can’t perform that action at this time.
0 commit comments