title: Phoenix Elixir Distillery not using correct database connection
body: <p>I'm trying to build a Phoenix application with Distillery, however when I try start the compiled application I keep getting an error about not being able to fine the database.</p>
  
  <pre><code>17:44:50.925 [error] GenServer #PID&lt;0.1276.0&gt; terminating
  ** (KeyError) key :database not found in: [hostname: "localhost", username: "martinffx", types: Ecto.Adapters.Postgres.TypeModule, port: 5432, name: Glitchr.Repo.Pool, otp_app: :glitchr, repo: Glitchr.Repo, adapter: Ecto.Adapters.Postgres, pool_size: 10, ssl: true, pool_timeout: 5000, timeout: 15000, adapter: Ecto.Adapters.Postgres, pool_size: 10, ssl: true, pool: DBConnection.Poolboy]
      (elixir) lib/keyword.ex:343: Keyword.fetch!/2
      (postgrex) lib/postgrex/protocol.ex:76: Postgrex.Protocol.connect/1
      (db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
      (connection) lib/connection.ex:622: Connection.enter_connect/5
      (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
  Last message: nil
  </code></pre>
  
  <p>Now the details above aren't what I've provided in the <code>prod.ex</code></p>
  
  <pre><code>config :glitchr, Glitchr.Endpoint,
    http: [port: {:system, "PORT"}],
    url: [host: "localhost", port: {:system, "PORT"}],
    cache_static_manifest: "priv/static/manifest.json",
    server: true,
    root: ".",
    version: Mix.Project.config[:version],
    secret_key_base: System.get_env("SECRET_KEY_BASE")
  
  config :glitchr, Glitchr.Repo,
    adapter: Ecto.Adapters.Postgres,
    url: System.get_env("DATABASE_URL"),
    pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
    ssl: true
  </code></pre>
  
  <p>Where my database url is <code>DATABASE_URL=postgres://glitchr:password@db:5433/glitchr</code></p>
  
  <p>Why is that? How can I debug what I'm not getting right?</p>