mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Docs update. Using a configuration file should be prioritized higher than inline options. Added example Rails configuration to the variants. Linked to Ubuntu setup from deployment docs.
This commit is contained in:
parent
5a7d884bdc
commit
765c125e41
2 changed files with 18 additions and 9 deletions
|
@ -38,6 +38,10 @@ Here are some rules of thumb:
|
||||||
* As you grow more confident in the thread safety of your app, you can tune the
|
* As you grow more confident in the thread safety of your app, you can tune the
|
||||||
workers down and the threads up.
|
workers down and the threads up.
|
||||||
|
|
||||||
|
#### Ubuntu / Systemd (Systemctl) Installation
|
||||||
|
|
||||||
|
See [systemd.md](systemd.md)
|
||||||
|
|
||||||
#### Worker utilization
|
#### Worker utilization
|
||||||
|
|
||||||
**How do you know if you're got enough (or too many workers)?**
|
**How do you know if you're got enough (or too many workers)?**
|
||||||
|
|
|
@ -32,21 +32,26 @@ Type=simple
|
||||||
# Preferably configure a non-privileged user
|
# Preferably configure a non-privileged user
|
||||||
# User=
|
# User=
|
||||||
|
|
||||||
# The path to the puma application root
|
# The path to the your application code root directory.
|
||||||
# Also replace the "<WD>" place holders below with this path.
|
# Also replace the "<YOUR_APP_PATH>" place holders below with this path.
|
||||||
WorkingDirectory=
|
# Example /home/username/myapp
|
||||||
|
WorkingDirectory=<YOUR_APP_PATH>
|
||||||
|
|
||||||
# Helpful for debugging socket activation, etc.
|
# Helpful for debugging socket activation, etc.
|
||||||
# Environment=PUMA_DEBUG=1
|
# Environment=PUMA_DEBUG=1
|
||||||
|
|
||||||
# The command to start Puma. This variant uses a binstub generated via
|
# SystemD will not run puma even if it is in your path. You must specify
|
||||||
# `bundle binstubs puma --path ./sbin` in the WorkingDirectory
|
# an absolute URL to puma. For example /usr/local/bin/puma
|
||||||
# (replace "<WD>" below)
|
# Alternatively, create a binstub with `bundle binstubs puma --path ./sbin` in the WorkingDirectory
|
||||||
ExecStart=<WD>/sbin/puma -b tcp://0.0.0.0:9292 -b ssl://0.0.0.0:9293?key=key.pem&cert=cert.pem
|
ExecStart=/<FULLPATH>/bin/puma -C <YOUR_APP_PATH>/puma.rb
|
||||||
|
|
||||||
|
# Variant: Rails start.
|
||||||
|
# ExecStart=/<FULLPATH>/bin/puma -C <YOUR_APP_PATH>/config/puma.rb ../config.ru
|
||||||
|
|
||||||
# Variant: Use config file with `bind` directives instead:
|
|
||||||
# ExecStart=<WD>/sbin/puma -C config.rb
|
|
||||||
# Variant: Use `bundle exec --keep-file-descriptors puma` instead of binstub
|
# Variant: Use `bundle exec --keep-file-descriptors puma` instead of binstub
|
||||||
|
# Variant: Specify directives inline.
|
||||||
|
# ExecStart=/<FULLPATH>/puma -b tcp://0.0.0.0:9292 -b ssl://0.0.0.0:9293?key=key.pem&cert=cert.pem
|
||||||
|
|
||||||
|
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue