From cb3b4a15e6913bc28ee2ecaab017a4c3f08c438e Mon Sep 17 00:00:00 2001
From: Paul Charlton <techguru@byiq.com>
Date: Tue, 11 Jul 2017 03:35:47 +0000
Subject: Support multiple Redis instances based on queue type

---
 scripts/prepare_build.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

(limited to 'scripts')

diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 03de59f27ad..68114d149c4 100644
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -12,9 +12,6 @@ fi
 # gems could not be found under some circumstance. No idea why, hours wasted.
 retry gem install knapsack fog-aws mime-types
 
-cp config/resque.yml.example config/resque.yml
-sed -i 's/localhost/redis/g' config/resque.yml
-
 cp config/gitlab.yml.example config/gitlab.yml
 
 # Determine the database by looking at the job name.
@@ -37,6 +34,18 @@ else # Assume it's mysql
     sed -i 's/# host:.*/host: mysql/g' config/database.yml
 fi
 
+cp config/resque.yml.example config/resque.yml
+sed -i 's/localhost/redis/g' config/resque.yml
+
+cp config/redis.cache.yml.example config/redis.cache.yml
+sed -i 's/localhost/redis/g' config/redis.cache.yml
+
+cp config/redis.queues.yml.example config/redis.queues.yml
+sed -i 's/localhost/redis/g' config/redis.queues.yml
+
+cp config/redis.shared_state.yml.example config/redis.shared_state.yml
+sed -i 's/localhost/redis/g' config/redis.shared_state.yml
+
 if [ "$SETUP_DB" != "false" ]; then
     bundle exec rake db:drop db:create db:schema:load db:migrate
 
-- 
cgit v1.2.1