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'] %>