diff --git a/Changelog.md b/Changelog.md index 6cc981a7..0e527703 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,7 @@ # Changelog **latest** +- removed internal redis server - shutdown the container gracefully **7.2.2** diff --git a/Dockerfile b/Dockerfile index fd79a872..8e80969d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ MAINTAINER sameer@damagehead.com RUN apt-get update \ && apt-get install -y supervisor logrotate locales \ - nginx openssh-server mysql-server redis-server \ + nginx openssh-server mysql-server redis-tools \ git-core postgresql-client ruby rubygems \ python2.7 python-docutils \ libmysqlclient18 libpq5 zlib1g libyaml-0-2 libssl1.0.0 \ diff --git a/README.md b/README.md index 7aac5434..96b29a9f 100644 --- a/README.md +++ b/README.md @@ -441,18 +441,11 @@ docker run --name=gitlab -d --link postgresql:postgresql \ ## Redis +GitLab uses the redis server for its key-value data store. The redis server connection details can be specified using environment variables. + ### Internal Redis Server -> **Warning** -> -> The internal redis server will soon be removed from the image. - -> Please use a linked [redis](#linking-to-redis-container) container -> or a external [redis](#external-redis-server) server - -> You've been warned. - -GitLab uses the redis server for its key-value data store. The redis server connection details can be specified using environment variables. If not specified, the starts a redis server internally, no additional configuration is required. +The internal redis server has been removed from the image. Please use a [linked redis](#linking-to-redis-container) container or specify a [external redis](#external-redis-server) connection. ### External Redis Server diff --git a/assets/init b/assets/init index 56949920..ebfcd75a 100755 --- a/assets/init +++ b/assets/init @@ -108,8 +108,7 @@ if [ -n "${REDISIO_PORT_6379_TCP_ADDR}" ]; then REDIS_PORT=${REDIS_PORT:-${REDISIO_PORT_6379_TCP_PORT}} fi -# fallback to using internal redis server -REDIS_HOST=${REDIS_HOST:-localhost} +# fallback to default redis port REDIS_PORT=${REDIS_PORT:-6379} # is a mysql or postgresql database linked? @@ -136,6 +135,14 @@ case "${DB_TYPE}" in *) echo "Unsupported database adapter. Available adapters are mysql and postgres." && exit 1 ;; esac +if [ -z "${REDIS_HOST}" ]; then + echo "ERROR: " + echo " Please configure the redis connection." + echo " Refer http://git.io/PMnRSw for more information." + echo " Cannot continue without a redis connection. Aborting..." + exit 1 +fi + case "${GITLAB_HTTPS}" in true) GITLAB_PORT=${GITLAB_PORT:-443} @@ -262,11 +269,6 @@ if [ "${DB_HOST}" == "localhost" ]; then fi fi -if [ "${REDIS_HOST}" == "localhost" ]; then - echo "Starting redis server..." - supervisorctl start redis-server >/dev/null -fi - # configure git for the 'git' user sudo -u git -H git config --global user.name "GitLab" sudo -u git -H git config --global user.email "${GITLAB_EMAIL}" diff --git a/assets/setup/install b/assets/setup/install index 7021108a..31e146be 100755 --- a/assets/setup/install +++ b/assets/setup/install @@ -165,20 +165,6 @@ stdout_logfile=/var/log/supervisor/%(program_name)s.log stderr_logfile=/var/log/supervisor/%(program_name)s.log EOF -# configure supervisord to start redis (manual) -sed 's/daemonize yes/daemonize no/' -i /etc/redis/redis.conf -cat > /etc/supervisor/conf.d/redis-server.conf < /etc/supervisor/conf.d/cron.conf <