Skip to content

Commit

Permalink
Specify deploy settings
Browse files Browse the repository at this point in the history
* Set values that DATABASE_URL won't override / set
* Add staging
* Use max of thread count or db pool, since @schneems says:
  > You need your pool to at least be as large as your puma thread
  > count.
  • Loading branch information
calebhearth committed Feb 2, 2015
1 parent a78dc1e commit ba12e09
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions templates/postgresql_database.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ test:
<<: *default
database: <%= app_name %>_test

production:
production: &deploy
encoding: utf8
min_messages: warning
pool: <%%= [ENV.fetch("MAX_THREADS", 2), ENV.fetch("DB_POOL", 2)].max %>
timeout: 5000
url: <%%= ENV.fetch("DATABASE_URL", "") %>
pool: <%%= ENV.fetch("DB_POOL", ENV.fetch("MAX_THREADS", 5) %>

staging: *deploy

0 comments on commit ba12e09

Please sign in to comment.