diff --git a/config/dev.exs b/config/dev.exs index a7bb8b41..a789e097 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -5,10 +5,13 @@ config :philomena, Philomena.Repo, username: "postgres", password: "postgres", database: "philomena_dev", - hostname: "localhost", + hostname: "postgres", show_sensitive_data_on_connection_error: true, pool_size: 10 +config :philomena, + elasticsearch_url: "http://elasticsearch:9200" + # For development, we disable any cache and enable # debugging and code reloading. # diff --git a/docker/app/run-development b/docker/app/run-development index 9f598cb6..15510792 100755 --- a/docker/app/run-development +++ b/docker/app/run-development @@ -10,7 +10,7 @@ # if it's not done doing whatever it does yet echo -n "Waiting for Elasticsearch" -until wget -qO - localhost:9200; do +until wget -qO - elasticsearch:9200; do echo -n "." sleep 2 done @@ -18,7 +18,7 @@ done echo # Try to create the database if it doesn't exist yet -createdb -h localhost -U postgres philomena_dev && mix ecto.setup_dev +createdb -h postgres -U postgres philomena_dev && mix ecto.setup_dev # Run the application mix phx.server \ No newline at end of file diff --git a/docker/web/nginx.conf b/docker/web/nginx.conf index ef6d14cb..94d34338 100644 --- a/docker/web/nginx.conf +++ b/docker/web/nginx.conf @@ -1,5 +1,5 @@ upstream philomena { - server localhost:4000 fail_timeout=0; + server app:4000 fail_timeout=0; } server {