-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Commit database.yml to git to setup pool size * Set `PORT` var, make sure to update your local `.env` https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server Closes: #286
- Loading branch information
1 parent
b92c296
commit 92c4eb8
Showing
10 changed files
with
41 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ log/*.log | |
tmp/* | ||
coverage/* | ||
rerun.txt | ||
config/database.yml | ||
doc/**/* | ||
vendor/bundle | ||
vendor/cache | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: bundle exec rails server thin -p $PORT -e $RACK_ENV | ||
web: bundle exec puma -C config/puma.rb |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
defaults: &defaults | ||
adapter: postgresql | ||
encoding: unicode | ||
min_messages: warning | ||
timeout: 5000 | ||
pool: <%= [ENV.fetch("MAX_THREADS", 5), ENV.fetch("DB_POOL", 5)].max %> | ||
|
||
development: | ||
database: application_dev | ||
<<: *defaults | ||
|
||
test: | ||
database: application_test | ||
<<: *defaults | ||
|
||
production: &deploy | ||
<<: *defaults | ||
|
||
staging: *deploy |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
workers ENV.fetch("WEB_CONCURRENCY", 2).to_i | ||
threads_count = ENV.fetch("MAX_THREADS", 5).to_i | ||
threads threads_count, threads_count | ||
|
||
rackup DefaultRackup | ||
port ENV.fetch("PORT", 5000) | ||
environment ENV.fetch("RACK_ENV", "development") | ||
|
||
preload_app! | ||
|
||
on_worker_boot do | ||
ActiveRecord::Base.establish_connection | ||
end |