From e0a0955d490e8bd24a832c516342bdcfd35c5bbd Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Mon, 4 Nov 2024 18:36:21 +0000 Subject: [PATCH] wip --- config/database.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/database.yml b/config/database.yml index ed11870de..579ddea27 100644 --- a/config/database.yml +++ b/config/database.yml @@ -17,6 +17,9 @@ default: &default adapter: postgis encoding: unicode + # AKS DATABASE_URL will start with `postgres://`, which overrides the postgis adapter + # so we need to replace `postgres` if it occurs at the beginning of DATABASE_URL + url: <%= ENV.fetch('DATABASE_URL', 'postgis://postgres@localhost:5432').sub(/^postgres/, "postgis") %> # For details on connection pooling, see Rails configuration guide # http://guides.rubyonrails.org/configuring.html#database-pooling pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>