2168f823a5
Previously we did not support authentication for redis anywhere. Also in the docker compose we were exposing redis port 6379 without any authentication. In the app side for the connections that app server (for storing keys as well as for socket connections made using action cable) and Sidekiq were making to redis server did not support authentication. With this commit, we support authentication for redis connections from app side and Sidekiq. This is supported in docker-compose as well. The changes include : * Added support for new env variable REDIS_PASSWORD * This redis password is now supported by action cable connections, Sidekiq connections and app side redis connections * Since Sidekiq did not have an initializer, added an initializer to pass custom config to Sidekiq (for now it's options for redis) * Changes in docker-compose to pickup a password set in .env file to protect the redis server running in docker * Added necessary documentation changes in `docker.md` and `environment-variables.md`
17 lines
455 B
YAML
17 lines
455 B
YAML
development:
|
|
adapter: redis
|
|
url: <%= ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379') %>
|
|
password: <%= ENV.fetch('REDIS_PASSWORD', nil) %>
|
|
|
|
test:
|
|
adapter: test
|
|
|
|
staging:
|
|
adapter: redis
|
|
url: <%= ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379') %>
|
|
password: <%= ENV.fetch('REDIS_PASSWORD', nil) %>
|
|
|
|
production:
|
|
adapter: redis
|
|
url: <%= ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379') %>
|
|
password: <%= ENV.fetch('REDIS_PASSWORD', nil) %>
|