From 402c2eae90faf753bb194460fd5ac0803f1e70b7 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sun, 8 Dec 2019 18:34:18 -0500 Subject: [PATCH] add redis host for docker env, fixes #3 --- config/config.exs | 1 + config/dev.exs | 3 ++- lib/philomena/application.ex | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/config.exs b/config/config.exs index 4cde91d6..7b14def1 100644 --- a/config/config.exs +++ b/config/config.exs @@ -10,6 +10,7 @@ import Config config :philomena, ecto_repos: [Philomena.Repo], elasticsearch_url: "http://localhost:9200", + redis_host: "localhost", password_pepper: "dn2e0EpZrvBLoxUM3gfQveBhjf0bG/6/bYhrOyq3L3hV9hdo/bimJ+irbDWsuXLP", otp_secret_key: "Wn7O/8DD+qxL0X4X7bvT90wOkVGcA90bIHww4twR03Ci//zq7PnMw8ypqyyT/b/C", tumblr_api_key: "fuiKNFp9vQFvjLNvx4sUwti4Yb5yGutBN4Xh10LXZhhRKjWlV4", diff --git a/config/dev.exs b/config/dev.exs index 277afa4e..f5e22575 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -10,7 +10,8 @@ config :philomena, Philomena.Repo, pool_size: 10 config :philomena, - elasticsearch_url: "http://elasticsearch:9200" + elasticsearch_url: "http://elasticsearch:9200", + redis_host: "redis" # For development, we disable any cache and enable # debugging and code reloading. diff --git a/lib/philomena/application.ex b/lib/philomena/application.ex index 66b516f9..e7dfca72 100644 --- a/lib/philomena/application.ex +++ b/lib/philomena/application.ex @@ -16,7 +16,7 @@ defmodule Philomena.Application do # {Philomena.Worker, arg}, Philomena.Servers.ImageProcessor, Pow.Store.Backend.MnesiaCache, - {Redix, name: :redix} + {Redix, name: :redix, host: Application.get_env(:philomena, :redis_host)} ] # See https://hexdocs.pm/elixir/Supervisor.html