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

Commit d1eddfb

Browse files
committed
Merge pull request #481 from Furze/master
Add environment variables for gunicorn logging
2 parents 4550e01 + c7af1ae commit d1eddfb

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
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'),

docker_registry/server/env.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
'SETTINGS_FLAVOR': 'dev',
1212
'GUNICORN_WORKERS': '4',
1313
'GUNICORN_GRACEFUL_TIMEOUT': '3600',
14-
'GUNICORN_SILENT_TIMEOUT': '3600'
14+
'GUNICORN_SILENT_TIMEOUT': '3600',
15+
'GUNICORN_ACCESS_LOG_FILE': '-',
16+
'GUNICORN_ERROR_LOG_FILE': '-'
1517
}
1618

1719

0 commit comments

Comments
 (0)