From c28b243358ed510f91ab201d0a2ea08f04767304 Mon Sep 17 00:00:00 2001 From: shibao Date: Fri, 10 Sep 2021 00:19:57 -0400 Subject: [PATCH] use DATABASE_URL in dev mode --- config/dev.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/dev.exs b/config/dev.exs index abf16531..27dcbef2 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -2,7 +2,9 @@ import Config # Configure your database config :cannery, Cannery.Repo, - url: "ecto://postgres:postgres@localhost/cannery_dev", + url: + System.get_env("DATABASE_URL") || + "ecto://postgres:postgres@localhost/cannery_dev", pool_size: 10 # For development, we disable any cache and enable