Skip to content

Commit

Permalink
Fix database config to allow native setup
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-starostenko committed Nov 4, 2018
1 parent 43f3dac commit 5a64ed8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
COMPOSE_PROJECT_NAME=operationcodebackend
REDIS_URL=redis://redis:6379/0
RAILS_ENV=development
POSTGRES_USER=postgres
POSTGRES_HOST=operationcode-psql
4 changes: 2 additions & 2 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ default: &default
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
user: postgres
host: <%= ENV['POSTGRES_HOST'].present? ? ENV['POSTGRES_HOST'] : 'operationcode-psql' %>
user: <%= ENV['POSTGRES_USER'] %>
host: <%= ENV['POSTGRES_HOST'] %>
password: <%= OperationCode.fetch_secret_with name: :postgres_password %>

development:
Expand Down

0 comments on commit 5a64ed8

Please sign in to comment.