mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
Possibility to change the redis database number
This commit is contained in:
parent
7bbcc0bbb2
commit
2a5ca84995
@ -831,6 +831,7 @@ Below is the complete list of available options that can be used to customize yo
|
||||
- **NGINX_X_FORWARDED_PROTO**: Advanced configuration option for the `proxy_set_header X-Forwarded-Proto` setting in the gitlab nginx vHost configuration. Defaults to `https` when `GITLAB_HTTPS` is `true`, else defaults to `$scheme`.
|
||||
- **REDIS_HOST**: The hostname of the redis server. Defaults to `localhost`
|
||||
- **REDIS_PORT**: The connection port of the redis server. Defaults to `6379`.
|
||||
- **REDIS_DB_NUMBER**: The redis database number. Defaults to '0'.
|
||||
- **UNICORN_WORKERS**: The number of unicorn workers to start. Defaults to `3`.
|
||||
- **UNICORN_TIMEOUT**: Sets the timeout of unicorn worker processes. Defaults to `60` seconds.
|
||||
- **SIDEKIQ_CONCURRENCY**: The number of concurrent sidekiq jobs to run. Defaults to `25`
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# If you change this file in a Merge Request, please also create
|
||||
# a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
|
||||
#
|
||||
production: redis://{{REDIS_HOST}}:{{REDIS_PORT}}
|
||||
production: redis://{{REDIS_HOST}}:{{REDIS_PORT}}/{{REDIS_DB_NUMBER}}
|
||||
|
||||
@ -50,6 +50,7 @@ esac
|
||||
## REDIS
|
||||
REDIS_HOST=${REDIS_HOST:-}
|
||||
REDIS_PORT=${REDIS_PORT:-}
|
||||
REDIS_DB_NUMBER=${REDIS_DB_NUMBER:-0}
|
||||
|
||||
## SIDEKIQ
|
||||
SIDEKIQ_SHUTDOWN_TIMEOUT=${SIDEKIQ_SHUTDOWN_TIMEOUT:-4}
|
||||
|
||||
@ -241,7 +241,7 @@ gitlab_finalize_redis_parameters() {
|
||||
|
||||
gitlab_check_redis_connection() {
|
||||
timeout=60
|
||||
while ! redis-cli -h ${REDIS_HOST} -p ${REDIS_PORT} ping >/dev/null 2>&1
|
||||
while ! redis-cli -h ${REDIS_HOST} -p ${REDIS_PORT} -n ${REDIS_DB_NUMBER} ping >/dev/null 2>&1
|
||||
do
|
||||
timeout=$(expr $timeout - 1)
|
||||
if [[ $timeout -eq 0 ]]; then
|
||||
@ -263,7 +263,8 @@ gitlab_configure_redis() {
|
||||
|
||||
update_template ${GITLAB_RESQUE_CONFIG} \
|
||||
REDIS_HOST \
|
||||
REDIS_PORT
|
||||
REDIS_PORT \
|
||||
REDIS_DB_NUMBER
|
||||
}
|
||||
|
||||
gitlab_configure_gitlab_workhorse() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user