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

Commit 0df048d

Browse files
author
Raymond Barbiero
committed
fix gunicorn arguments so that docker-registry can start without error
1 parent 1bf6773 commit 0df048d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docker_registry/run.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ def run_gunicorn():
7474
'--error-logfile', env.source('GUNICORN_ERROR_LOG_FILE'),
7575
'--max-requests', '100',
7676
'-k', 'gevent',
77-
'--reload', False if env.source('SETTINGS_FLAVOR') == 'prod' else True,
7877
'--graceful-timeout', env.source('GUNICORN_GRACEFUL_TIMEOUT'),
7978
'-t', env.source('GUNICORN_SILENT_TIMEOUT'),
8079
'-w', env.source('GUNICORN_WORKERS'),
8180
'-b', address,
82-
] + env.source('GUNICORN_OPTS') + [
83-
'docker_registry.wsgi:application'
8481
]
8582

83+
if env.source('SETTINGS_FLAVOR') != 'prod':
84+
args.append('--reload')
85+
8686
user = env.source('GUNICORN_USER')
8787
group = env.source('GUNICORN_GROUP')
8888
if user or group:
@@ -99,5 +99,7 @@ def run_gunicorn():
9999
else:
100100
logger.warn('You asked we drop priviledges, but we are not root!')
101101

102+
args += env.source('GUNICORN_OPTS')
103+
args.append('docker_registry.wsgi:application')
102104
# Stringify all args and call
103105
os.execl(*[str(v) for v in args])

0 commit comments

Comments
 (0)