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

Commit 1ac4228

Browse files
author
Mangled Deutz
committed
Minimal maintenance on contrib scripts
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <[email protected]> (github: dmp42)
1 parent d44e249 commit 1ac4228

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

contrib/docker-registry.conf

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ env REGISTRY_DIR=/srv/docker/registry
99
env USER=www-data
1010
env GROUP=www-data
1111
env LOG_FILE=/var/log/docker/registry.log
12-
env NUM_WORKERS=9
12+
env GUNICORN_WORKERS=9
1313

14-
env ADDRESS=127.0.0.1:5000
14+
env REGISTRY_PORT=5000
15+
env REGISTRY_HOST=127.0.0.1
1516

1617

1718
pre-start script
@@ -27,5 +28,5 @@ script
2728

2829
[ -r $REGISTRY_DIR/.venv/bin/activate ] && . $REGISTRY_DIR/.venv/bin/activate
2930
cd $REGISTRY_DIR
30-
exec gunicorn -w $NUM_WORKERS --bind=$ADDRESS --user=$USER --group=$GROUP --log-level=$LOG_LEVEL --log-file=$LOG_FILE 2>>$LOG_FILE wsgi:application
31+
exec gunicorn -w $GUNICORN_WORKERS --bind=$REGISTRY_HOST:$REGISTRY_PORT --user=$USER --group=$GROUP --log-level=$LOG_LEVEL --log-file=$LOG_FILE 2>>$LOG_FILE docker_registry.wsgi:application
3132
end script

contrib/docker-registry_RHEL.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ self_dir="${self_path%%/${self_path##*/}}"
4343

4444
NAME="Docker Registry"
4545
DAEMON="/usr/bin/gunicorn"
46-
DAEMON_OPTS="-D --error-logfile ${ERROR_LOGFILE} --access-logfile ${ACCESS_LOGFILE} --log-file ${LOGFILE} --pid ${PIDFILE} --max-requests 500 --graceful-timeout 3600 -t 3600 -k gevent -b ${LISTEN_IP}:${LISTEN_PORT} -w ${GUNICORN_WORKERS:-2} wsgi:application"
46+
DAEMON_OPTS="-D --error-logfile ${ERROR_LOGFILE} --access-logfile ${ACCESS_LOGFILE} --log-file ${LOGFILE} --pid ${PIDFILE} --max-requests 500 --graceful-timeout 3600 -t 3600 -k gevent -b ${LISTEN_IP}:${LISTEN_PORT} -w ${GUNICORN_WORKERS:-2} docker_registry.wsgi:application"
4747

4848
RED='\e[0;31m'
4949
GREEN='\e[0;32m'

contrib/docker-registry_debian.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Required-Start: $network $remote_fs $syslog
66
# Required-Stop: $network $remote_fs $syslog
77
# Default-Start: 2 3 4 5
8-
# Default-Stop: 0 1 6
8+
# Default-Stop: 0 1 6
99
# Short-Description: Start Docker-Registry
1010
### END INIT INFO
1111

@@ -33,15 +33,15 @@ self_dir="${self_path%%/${self_path##*/}}"
3333
# set defaults if they are not set by config
3434
[[ -z "$RUNAS" ]] && RUNAS=$(stat --format "%U" $self_path) # defaults to user owning this init script
3535
[[ -z "$LOGFILE" ]] && LOGFILE=/var/log/docker-registry.log # will be chowned to $RUNAS
36-
[[ -z "$PIDFILE" ]] && PIDFILE=/var/run/docker-registry/docker-registry.pid # path will created and chowned to $RUNAS
36+
[[ -z "$PIDFILE" ]] && PIDFILE=/var/run/docker-registry/docker-registry.pid # path will created and chowned to $RUNAS
3737
[[ -z "$LISTEN_IP" ]] && LISTEN_IP="0.0.0.0"
3838
[[ -z "$LISTEN_PORT" ]] && LISTEN_PORT=5000
3939
[[ -z "$GUNICORN_WORKERS" ]] && GUNICORN_WORKERS=2
4040
[[ -z "$DOCKER_REGISTRY_HOME" ]] && DOCKER_REGISTRY_HOME=${self_dir%/*}
4141

4242
NAME="Docker Registry"
4343
DAEMON="/usr/local/bin/gunicorn"
44-
DAEMON_OPTS="-D --access-logfile ${LOGFILE} --pid ${PIDFILE} --max-requests 500 --graceful-timeout 3600 -t 3600 -k gevent -b ${LISTEN_IP}:${LISTEN_PORT} -w ${GUNICORN_WORKERS:-2} wsgi:application"
44+
DAEMON_OPTS="-D --access-logfile ${LOGFILE} --pid ${PIDFILE} --max-requests 500 --graceful-timeout 3600 -t 3600 -k gevent -b ${LISTEN_IP}:${LISTEN_PORT} -w ${GUNICORN_WORKERS:-2} docker_registry.wsgi:application"
4545

4646
RED='\e[0;31m'
4747
GREEN='\e[0;32m'

0 commit comments

Comments
 (0)