FEATURE: allow use of redis sentinel via redis_sentinels

Use: DISCOURSE_REDIS_SENTINELS and DISCOURSE_REDIS_HOST to configure redis
sentinel
This commit is contained in:
Sam
2015-06-25 16:51:48 +10:00
parent 18f887772d
commit 8252f4e110
10 changed files with 30 additions and 90 deletions

View File

@@ -20,12 +20,6 @@ production:
destination: <%= ENV['RAILS_STACK_PATH'] %>/Procfile
target: rails
run_on: all_servers
# 4. Copy redis settings
- source: /config/cloud/cloud66/files/redis.yml
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/redis.yml
target: rails
parse: false
run_on: all_servers
# 5. Copy production.rb file
- source: /config/cloud/cloud66/files/production.rb
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/environments/production.rb
@@ -103,12 +97,6 @@ staging:
destination: <%= ENV['RAILS_STACK_PATH'] %>/Procfile
target: rails
run_on: all_servers
# 4. Rename redis.yml.sample file
- source: /config/cloud/cloud66/files/redis.yml
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/redis.yml
target: rails
parse: false
run_on: all_servers
# 5. Rename production.rb.sample file
- source: /config/cloud/cloud66/files/production.rb
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/environments/production.rb
@@ -168,8 +156,6 @@ development:
first_thing:
# 1. Permissions on postgres box
- source: /config/cloud/cloud66/scripts/permissions.sh
destination: /tmp/scripts/permissions.sh
target: postgresql
apply_during: build_only
execute: true
sudo: true
@@ -186,12 +172,6 @@ development:
destination: <%= ENV['RAILS_STACK_PATH'] %>/Procfile
target: rails
run_on: all_servers
# 4. Rename redis.yml.sample file
- source: /config/cloud/cloud66/files/redis.yml
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/redis.yml
target: rails
parse: false
run_on: all_servers
# 5. Move thin config to server
- source: /config/cloud/cloud66/files/thin.yml
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/thin.yml
@@ -241,4 +221,4 @@ development:
target: rails
apply_during: build_only
execute: true
sudo: true
sudo: true

View File

@@ -1,22 +0,0 @@
defaults: &defaults
uri: <%= uri = URI.parse( ENV['REDIS_ADDRESS'].nil? ? ENV['REDIS_PROVIDER_URL'] || "redis://localhost:6379" : "redis://#{ENV['REDIS_ADDRESS']}:6379") %>
host: <%= uri.host %>
port: <%= uri.port %>
password: <%= uri.password %>
db: 0
development:
<<: *defaults
profile:
<<: *defaults
test:
<<: *defaults
db: 1
staging:
<<: *defaults
production:
<<: *defaults