This repository was archived by the owner on Sep 12, 2018. It is now read-only.
File tree 3 files changed +8
-7
lines changed
3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ env REGISTRY_DIR=/srv/docker/registry
9
9
env USER=www-data
10
10
env GROUP=www-data
11
11
env LOG_FILE=/var/log/docker/registry.log
12
- env NUM_WORKERS =9
12
+ env GUNICORN_WORKERS =9
13
13
14
- env ADDRESS=127.0.0.1:5000
14
+ env REGISTRY_PORT=5000
15
+ env REGISTRY_HOST=127.0.0.1
15
16
16
17
17
18
pre-start script
27
28
28
29
[ -r $REGISTRY_DIR/.venv/bin/activate ] && . $REGISTRY_DIR/.venv/bin/activate
29
30
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
31
32
end script
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ self_dir="${self_path%%/${self_path##*/}}"
43
43
44
44
NAME=" Docker Registry"
45
45
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"
47
47
48
48
RED=' \e[0;31m'
49
49
GREEN=' \e[0;32m'
Original file line number Diff line number Diff line change 5
5
# Required-Start: $network $remote_fs $syslog
6
6
# Required-Stop: $network $remote_fs $syslog
7
7
# Default-Start: 2 3 4 5
8
- # Default-Stop: 0 1 6
8
+ # Default-Stop: 0 1 6
9
9
# Short-Description: Start Docker-Registry
10
10
# ## END INIT INFO
11
11
@@ -33,15 +33,15 @@ self_dir="${self_path%%/${self_path##*/}}"
33
33
# set defaults if they are not set by config
34
34
[[ -z " $RUNAS " ]] && RUNAS=$( stat --format " %U" $self_path ) # defaults to user owning this init script
35
35
[[ -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
37
37
[[ -z " $LISTEN_IP " ]] && LISTEN_IP=" 0.0.0.0"
38
38
[[ -z " $LISTEN_PORT " ]] && LISTEN_PORT=5000
39
39
[[ -z " $GUNICORN_WORKERS " ]] && GUNICORN_WORKERS=2
40
40
[[ -z " $DOCKER_REGISTRY_HOME " ]] && DOCKER_REGISTRY_HOME=${self_dir%/* }
41
41
42
42
NAME=" Docker Registry"
43
43
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"
45
45
46
46
RED=' \e[0;31m'
47
47
GREEN=' \e[0;32m'
You can’t perform that action at this time.
0 commit comments