Ver código fonte

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 anos atrás
pai
commit
fc73355609

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

@@ -27,7 +27,7 @@ config :hello, Hello.Repo,
   username: "benchmarkdbuser",
   username: "benchmarkdbuser",
   password: "benchmarkdbpass",
   password: "benchmarkdbpass",
   database: "hello_world",
   database: "hello_world",
-  hostname: "localhost"
+  hostname: "TFB-database"
 
 
 # Do not include metadata nor timestamps in development logs
 # Do not include metadata nor timestamps in development logs
 config :logger, :console, format: "[$level] $message\n"
 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",
   username: "benchmarkdbuser",
   password: "benchmarkdbpass",
   password: "benchmarkdbpass",
   database: "hello_world",
   database: "hello_world",
-  hostname: "127.0.0.1",
+  hostname: "TFB-database",
   pool_size: 256
   pool_size: 256
 
 
 # ## SSL Support
 # ## SSL Support

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

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