فهرست منبع

Fix database hostname used by phoenix (#3053)

Using "127.0.0.1" in the prod config meant that the sed command in
setup.sh, which replaced instances of "localhost" (not "127.0.0.1")
with the correct database hostname read from the DBHOST environment
variable, did not have the desired effect.

"TFB-database" is the correct hostname to use; there's no need to read
the DBHOST environment variable.

This change fixes all the database tests for phoenix.
Michael Hixson 7 سال پیش
والد
کامیت
fc73355609
3فایلهای تغییر یافته به همراه2 افزوده شده و 4 حذف شده
  1. 1 1
      frameworks/Elixir/phoenix/config/dev.exs
  2. 1 1
      frameworks/Elixir/phoenix/config/prod.exs
  3. 0 2
      frameworks/Elixir/phoenix/setup.sh

+ 1 - 1
frameworks/Elixir/phoenix/config/dev.exs

@@ -27,7 +27,7 @@ config :hello, Hello.Repo,
   username: "benchmarkdbuser",
   password: "benchmarkdbpass",
   database: "hello_world",
-  hostname: "localhost"
+  hostname: "TFB-database"
 
 # Do not include metadata nor timestamps in development logs
 config :logger, :console, format: "[$level] $message\n"

+ 1 - 1
frameworks/Elixir/phoenix/config/prod.exs

@@ -14,7 +14,7 @@ config :hello, Hello.Repo,
   username: "benchmarkdbuser",
   password: "benchmarkdbpass",
   database: "hello_world",
-  hostname: "127.0.0.1",
+  hostname: "TFB-database",
   pool_size: 256
 
 # ## SSL Support

+ 0 - 2
frameworks/Elixir/phoenix/setup.sh

@@ -2,8 +2,6 @@
 
 fw_depends postgresql elixir
 
-sed -i 's|localhost|'${DBHOST}'|g' config/prod.exs
-
 rm -rf _build deps
 
 export MIX_ENV=prod