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

Commit 2008330

Browse files
committed
docker_registry.run: Restore GUNICORN_OPTS functionality
This was initially added in 534c6da (run.sh: Add '$GUNICORN_OPTS "$@"' to gunicorn invocation, 2014-02-13), but didn't survive the translation to a setuptools entry_points in bf3360a (replacing run.sh with a "docker-registry" console script, 2014-04-02). bf3360a was part of #297, which branched off before 534c6da landed with #247, and the entry_points invocation wasn't updated to reflect the change. The syntax has also changed a bit, since we're invoking Gunicorn from Python instead of Bash. Instead of dropping the string verbatim onto the command-line ($GUNICORN_OPTS), it now goes through the usual docker_registry.server.env.source YAML parsing (884b418, Type from environment properly (like Config), 2014-06-23). So instead of something like: GUNICORN_OPTS='--preload --log-syslog' you should now be using: GUNICORN_OPTS='[--preload, --log-syslog]'
1 parent 8712fbe commit 2008330

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docker_registry/run.py

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def run_gunicorn():
7777
'-t', env.source('GUNICORN_SILENT_TIMEOUT'),
7878
'-w', env.source('GUNICORN_WORKERS'),
7979
'-b', address,
80+
] + env.source('GUNICORN_OPTS') + [
8081
'docker_registry.wsgi:application'
8182
]
8283

docker_registry/server/env.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
'GUNICORN_GRACEFUL_TIMEOUT': '3600',
1414
'GUNICORN_SILENT_TIMEOUT': '3600',
1515
'GUNICORN_ACCESS_LOG_FILE': '"-"',
16-
'GUNICORN_ERROR_LOG_FILE': '"-"'
16+
'GUNICORN_ERROR_LOG_FILE': '"-"',
17+
'GUNICORN_OPTS': '[]',
1718
}
1819

1920

0 commit comments

Comments
 (0)