Created
February 24, 2023 13:41
-
-
Save tadas-s/0f98817f7409600511740b3b92ffd1a1 to your computer and use it in GitHub Desktop.
Simplified Rails database configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: &default | |
adapter: postgresql | |
encoding: unicode | |
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
url: <%= ENV["DATABASE_URL"] %> | |
development: | |
<<: *default | |
test: | |
<<: *default | |
url: <%= ENV["DATABASE_URL_TEST"] %> | |
production: | |
<<: *default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reason for a separate
DATABASE_URL_TEST
: makes it nearly impossible to successfully runrake test
or similar in non-dev/test environments.