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

Commit 498491e

Browse files
committed
Upgraded gunicorn to 19.1
* Upgraded gunicorn to 19.1 to gain timezones in logs * Altered docker-registry logging to include timezone * Altered documentation to more closely reflect implementation (-w and --max-requests flags as per use in run.py) * Removed unecessary documentation from wsgi.py * Removed deprecated --debug flag (http://docs.gunicorn.org/en/19.0/news.html#core)
1 parent 5f965db commit 498491e

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ sudo python-pip install docker-registry[bugsnag]
437437
#### Run it
438438
439439
```
440-
gunicorn --access-logfile - --debug -k gevent -b 0.0.0.0:5000 -w 1 docker_registry.wsgi:application
440+
gunicorn --access-logfile - -k gevent -b 0.0.0.0:5000 -w 10 --max-requests 100 docker_registry.wsgi:application
441441
```
442442
443443
### How do I setup user accounts?

docker_registry/app.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
# logging has been configured
2020
cfg = config.load()
2121
logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s',
22-
level=getattr(logging, cfg.loglevel.upper()))
22+
level=getattr(logging, cfg.loglevel.upper()),
23+
datefmt="%d/%b/%Y:%H:%M:%S %z")
2324

2425
from .lib import mirroring
2526
from .server import __version__

docker_registry/run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
GUNICORN_GROUP: unix group to downgrade priviledges to
4242
GUNICORN_ACCESS_LOG_FILE: File to log access to
4343
GUNICORN_ERROR_LOG_FILE: File to log errors to
44+
GUNICORN_OPTS: extra options to pass to gunicorn
4445
"""
4546

4647

@@ -70,7 +71,6 @@ def run_gunicorn():
7071
gunicorn_path, 'gunicorn',
7172
'--access-logfile', env.source('GUNICORN_ACCESS_LOG_FILE'),
7273
'--error-logfile', env.source('GUNICORN_ERROR_LOG_FILE'),
73-
'--debug',
7474
'--max-requests', '100',
7575
'-k', 'gevent',
7676
'--graceful-timeout', env.source('GUNICORN_GRACEFUL_TIMEOUT'),

docker_registry/wsgi.py

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
port = env.source('REGISTRY_PORT')
2323
app.debug = True
2424
app.run(host=host, port=port)
25-
# Or you can run:
26-
# gunicorn --access-logfile - --log-level debug --debug -b 0.0.0.0:5000 \
27-
# -w 1 wsgi:application
2825
else:
2926
# For uwsgi
3027
app.logger.setLevel(logging.INFO)

requirements/main.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ blinker==1.3
22
Flask==0.10.1
33
Flask-cors==1.3.0
44
gevent==1.0.1
5-
gunicorn==18.0
5+
gunicorn==19.1
66
PyYAML==3.11
77
requests==2.3.0
88
rsa==3.1.4

0 commit comments

Comments
 (0)