Skip to content

Commit

Permalink
Merge pull request #50 from ElsonOtake/elephantsql
Browse files Browse the repository at this point in the history
Elephantsql
  • Loading branch information
ElsonOtake authored May 24, 2023
2 parents 6f31d44 + 034afc8 commit bf26959
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ gem 'pg', '~> 1.1'
# Use the Puma web server [https://github.com/puma/puma]
gem 'puma', '~> 5.0'

gem 'dotenv-rails', require: 'dotenv/rails-now'

gem 'active_model_serializers'

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
Expand Down Expand Up @@ -61,6 +59,7 @@ group :development, :test do
gem 'rspec-rails'
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem 'debug', platforms: %i[mri mingw x64_mingw]
gem 'dotenv-rails'
end

group :development do
Expand Down
16 changes: 10 additions & 6 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@
default: &default
adapter: postgresql
encoding: unicode

database: <%= ENV['DATABASE_NAME'] %>
username: <%= ENV['DATABASE_USERNAME'] %>
password: <%= ENV['DATABASE_PASSWORD'] %>
host: <%= ENV['DATABASE_HOST'] %>
port: <%= ENV['DATABASE_PORT'] %>

# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
host: <%= ENV["DATABASE_HOST"] %>
username: <%= ENV["DATABASE_USER"] %>
password: <%= ENV["DATABASE_PASSWORD"] %>

development:
<<: *default
database: Final_capstone_backend_development
# database: Final_capstone_backend_development

# The specified database role being used to connect to postgres.
# To create additional roles in postgres see `$ createuser --help`.
Expand Down Expand Up @@ -60,7 +64,7 @@ development:
# Do not set this db to the same as development or production.
test:
<<: *default
database: Final_capstone_backend_test
# database: Final_capstone_backend_test

# As with config/credentials.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
Expand All @@ -84,4 +88,4 @@ test:
#
production:
<<: *default
url: <%= ENV['DATABASE_URL'] %>
# url: <%= ENV['DATABASE_URL'] %>
21 changes: 21 additions & 0 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf26959

Please sign in to comment.