docs/jungle/rc.d/README.md
Manage multiple Puma servers as services on one box using FreeBSD's rc.d service.
jq - a command-line json parser is needed to parse the json in the config file# Copy the puma script to the rc.d directory (make sure everyone has read/execute perms)
sudo cp puma /usr/local/etc/rc.d/
# Create an empty configuration file
sudo touch /usr/local/etc/puma.conf
# Enable the puma service
sudo echo 'puma_enable="YES"' >> /etc/rc.conf
Puma apps are referenced in /usr/local/etc/puma.conf by default.
Start the jungle running:
service puma start
This script will run at boot time.
You can also stop the jungle (stops ALL puma instances) by running:
service puma stop
To restart the jungle:
service puma restart
config/puma.rb in your app. E.g.: /home/apps/my-app/config/puma.rb.You can always change those defaults by editing the scripts.
{
"servers" : [
{
"dir": "/path/to/rails/project",
"user": "deploy-user",
"ruby_version": "ruby.version",
"ruby_env": "rbenv"
}
]
}
You need to customise puma.conf to:
Only rbenv is currently supported.