Skip to content

Commit

Permalink
Dev container: Update postgres.yml.tt
Browse files Browse the repository at this point in the history
When working in a devcontainer and using postgres, we need to specific the host, username and password. The host will be in the RAILS_DATABASE_HOST env variable, and the username and passwords are the postgres defaults.

Co-authored-by: Rafael Mendonça França <rafael@franca.dev>
  • Loading branch information
andrewn617 and rafaelfranca committed Jan 29, 2024
1 parent 0f0cd7a commit 920fde5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ default: &default
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
<%% if ENV["RAILS_DATABASE_HOST"] %>
host: <%%= ENV["RAILS_DATABASE_HOST"] %>
username: postgres
password: postgres
<%% end %>

development:
<<: *default
Expand Down

0 comments on commit 920fde5

Please sign in to comment.