Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 7fe1122

Browse files
committed
Updated run.py to include env variables for logging gunicorn to files
1 parent 80459cd commit 7fe1122

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docker_registry/run.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
REGISTRY_PORT: TCP port to bind to; default is 5000
3737
GUNICORN_WORKERS: number of worker processes gunicorn should start
3838
GUNICORN_GRACEFUL_TIMEOUT: timeout in seconds for graceful worker restart
39-
GUNiCORN_SILENT_TIMEOUT: timeout in seconds for restarting silent workers
40-
GUNiCORN_USER: unix user to downgrade priviledges to
41-
GUNiCORN_GROUP: unix group to downgrade priviledges to
39+
GUNICORN_SILENT_TIMEOUT: timeout in seconds for restarting silent workers
40+
GUNICORN_USER: unix user to downgrade priviledges to
41+
GUNICORN_GROUP: unix group to downgrade priviledges to
42+
GUNICORN_ACCESS_LOG_FILE: File to log access to
43+
GUNICORN_ERROR_LOG_FILE: File to log errors to
4244
"""
4345

4446

@@ -66,7 +68,9 @@ def run_gunicorn():
6668

6769
args = [
6870
gunicorn_path, 'gunicorn',
69-
'--access-logfile', '-', '--debug',
71+
'--access-logfile', env.source('GUNICORN_ACCESS_LOG_FILE'),
72+
'--error-logfile', env.source('GUNICORN_ERROR_LOG_FILE'),
73+
'--debug',
7074
'--max-requests', '100',
7175
'-k', 'gevent',
7276
'--graceful-timeout', env.source('GUNICORN_GRACEFUL_TIMEOUT'),

0 commit comments

Comments
 (0)