mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-25 14:08:09 +00:00
removed internal redis server
This commit is contained in:
parent
71d8237156
commit
35277f3003
@ -1,6 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
**latest**
|
||||
- removed internal redis server
|
||||
- shutdown the container gracefully
|
||||
|
||||
**7.2.2**
|
||||
|
||||
@ -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 \
|
||||
|
||||
13
README.md
13
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
|
||||
|
||||
|
||||
16
assets/init
16
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}"
|
||||
|
||||
@ -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 <<EOF
|
||||
[program:redis-server]
|
||||
priority=20
|
||||
directory=/tmp
|
||||
command=/usr/bin/redis-server /etc/redis/redis.conf
|
||||
user=redis
|
||||
autostart=false
|
||||
autorestart=true
|
||||
stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
||||
stderr_logfile=/var/log/supervisor/%(program_name)s.log
|
||||
EOF
|
||||
|
||||
# configure supervisord to start crond
|
||||
cat > /etc/supervisor/conf.d/cron.conf <<EOF
|
||||
[program:cron]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user