From 70c29c6cbd505d1b7b9162b9d932267e7a508b8b Mon Sep 17 00:00:00 2001 From: rubic0n Date: Sun, 10 Jan 2021 23:17:12 -0600 Subject: [PATCH] Fix "ERR! error: password authentication failed for user "vagrant"" --- .env.vagrant | 1 + config/database.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.env.vagrant b/.env.vagrant index 5fdcc11e..28c347c4 100644 --- a/.env.vagrant +++ b/.env.vagrant @@ -1,2 +1,3 @@ VAGRANT=true LOCAL_DOMAIN=gabsocial.local +DB_HOST=/var/run/postgresql/ diff --git a/config/database.yml b/config/database.yml index ef536a3c..01e761af 100644 --- a/config/database.yml +++ b/config/database.yml @@ -5,6 +5,13 @@ default: &default encoding: unicode sslmode: <%= ENV['DB_SSLMODE'] || "prefer" %> +dev_connection: &dev_connection + database: <%= ENV['DB_NAME'] || 'gabsocial_development' %> + username: <%= ENV['DB_USER'] %> + password: <%= ENV['DB_PASS'] %> + host: <%= ENV['DB_HOST'] %> + port: <%= ENV['DB_PORT'] %> + development: <<: *default adapter: postgresql_makara @@ -14,10 +21,10 @@ development: sticky: true connections: - role: master + <<: *dev_connection blacklist_duration: 0 - url: postgresql://<%= ENV['DB_USER']%>:<%= ENV['DB_PASS'] %>@<%= ENV['DB_HOST'] %>:<%= ENV['DB_PORT'] %>/<%= ENV['DB_NAME'] || 'gabsocial_development' %> - role: slave - url: postgresql://<%= ENV['DB_USER']%>:<%= ENV['DB_PASS'] %>@<%= ENV['DB_HOST'] %>:<%= ENV['DB_PORT'] %>/<%= ENV['DB_NAME'] || 'gabsocial_development' %> + <<: *dev_connection # database: <%= ENV['DB_NAME'] || 'gabsocial_development' %> # username: <%= ENV['DB_USER'] %>