Created
September 19, 2015 14:03
-
-
Save MartinElvar/cf552dd2afff6e6b7cd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prod.ex | |
config :mobil, Mobil.Endpoint, | |
secret_key_base: System.get_env("PHOENIX_SECRET") | |
# Finally import the config/prod.secret.exs | |
# which should be versioned separately. | |
config :mobil, Mobil.Repo, | |
adapter: Ecto.Adapters.Postgres, | |
host: "db", | |
username: "postgres", #System.get_env("DB_ENV_user"), | |
password: "", #System.get_env("DB_ENV_password"), | |
database: "mobil_prod", | |
pool_size: 20 | |
# When running docker. | |
web_1 | ** (exit) exited in: GenServer.call(#PID<0.163.0>, {:query, "CREATE TABLE IF NOT EXISTS \"schema_migrations\" (\"version\" bigint PRIMARY KEY, \"inserted_at\" timestamp)", []}, :infinity) | |
web_1 | ** (EXIT) %Postgrex.Error{message: "tcp connect: econnrefused", postgres: nil} | |
web_1 | (elixir) lib/gen_server.ex:356: GenServer.call/3 | |
web_1 | (postgrex) lib/postgrex/connection.ex:102: Postgrex.Connection.query/4 | |
web_1 | (ecto) lib/ecto/adapters/postgres/connection.ex:31: Ecto.Adapters.Postgres.Connection.query/4 | |
web_1 | (ecto) lib/ecto/adapters/sql.ex:243: Ecto.Adapters.SQL.query/7 | |
web_1 | (ecto) lib/ecto/pool.ex:159: Ecto.Pool.do_run/4 | |
web_1 | (ecto) lib/ecto/adapters/sql.ex:231: Ecto.Adapters.SQL.query/6 | |
web_1 | (ecto) lib/ecto/adapters/sql.ex:209: Ecto.Adapters.SQL.query/5 | |
web_1 | (ecto) lib/ecto/adapters/sql.ex:170: Ecto.Adapters.SQL.query!/5 | |
# When running IEX, inside web_1 container. | |
iex(1)> {:ok, pid} = Postgrex.Connection.start_link(hostname: "db", username: "postgres", password: "", database: "postgres") | |
{:ok, #PID<0.219.0>} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment