Skip to content

Instantly share code, notes, and snippets.

@rafaelqueiroz88
Created October 15, 2021 19:39
Show Gist options
  • Save rafaelqueiroz88/6f6f0f1b19757b0228be6f669b0a066d to your computer and use it in GitHub Desktop.
Save rafaelqueiroz88/6f6f0f1b19757b0228be6f669b0a066d to your computer and use it in GitHub Desktop.
Ruby on Rails DB setup for Docker and Postgresql
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
<<: *default
database: YourAppName_development
host: db
user: postgres
password: nopass
port: 5432
test:
<<: *default
database: YourAppName_test
production:
<<: *default
database: <%= ENV['DATABASE_URL'] %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment