This repository has been archived by the owner on Mar 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch server to puma, provide puma config and adapt command line
- configure puma using config/puma.rb config file - add default puma.rb config file for new projects - adapt dashing cli to use the config file and correctly handle -d (daemonize) arg. - adapt cli_test.rb to the new setup - remove tmp dir from gitignore as we want to generate it in the project template - add tmp/pids/ dir in project template (for saving puma pid / state files.
- Loading branch information
Showing
8 changed files
with
72 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,5 @@ | |
*.gem | ||
coverage/ | ||
log/ | ||
tmp/ | ||
.ruby-version | ||
history.yml |
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 |
---|---|---|
|
@@ -3,5 +3,6 @@ rvm: | |
- 2.3.0 | ||
- 2.2.4 | ||
- 2.1.8 | ||
|
||
- jruby-19mode | ||
- jruby-9.0.4.0 | ||
script: "rake test" |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# For a complete list of puma configuration parameters, please see | ||
# https://github.com/puma/puma | ||
|
||
# Puma can serve each request in a thread from an internal thread pool. | ||
# The `threads` method setting takes two numbers a minimum and maximum. | ||
# Any libraries that use thread pools should be configured to match | ||
# the maximum value specified for Puma. Default is set to 5 threads for minimum | ||
# and maximum. | ||
# | ||
threads_count = ENV.fetch("PUMA_MAX_THREADS") { 5 }.to_i | ||
threads threads_count, threads_count | ||
|
||
# Specifies the `port` that Puma will listen on to receive requests, default is 2020. | ||
# | ||
port ENV.fetch("DASHING_PORT") { 3030 } | ||
|
||
# Specifies the `environment` that Puma will run in. | ||
# | ||
environment ENV.fetch("RACK_ENV") { "production" } | ||
|
||
# Daemonize the server into the background. Highly suggest that | ||
# this be combined with "pidfile" and "stdout_redirect". | ||
# | ||
# The default is "false". | ||
# | ||
daemonize ENV.fetch("DAEMONIZE") { false } | ||
|
||
# Store the pid of the server in the file at "path". | ||
# | ||
pidfile './tmp/pids/puma.pid' | ||
|
||
# Use "path" as the file to store the server info state. This is | ||
# used by "pumactl" to query and control the server. | ||
# | ||
state_path './tmp/pids/puma.state' | ||
|
||
# Redirect STDOUT and STDERR to files specified. The 3rd parameter | ||
# ("append") specifies whether the output is appended, the default is | ||
# "false". | ||
# | ||
# stdout_redirect '/u/apps/lolcat/log/stdout', '/u/apps/lolcat/log/stderr' | ||
# stdout_redirect '/u/apps/lolcat/log/stdout', '/u/apps/lolcat/log/stderr', true |
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 @@ | ||
.empty_directory |
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