Merge pull request #14633 from matthewd/narrow_database_url

Only apply DATABASE_URL for Rails.env