aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Land <caleb.land@gmail.com>2013-04-30 19:15:15 -0400
committerCaleb Land <caleb.land@gmail.com>2013-04-30 19:15:15 -0400
commit8a961f55040ca90b680b954b02b5cc9d6afec09e (patch)
tree1a5bad9069cecdc84e0c89562207d80c09ba1a11
parent034e6d2eed9acf04456c1771b925191b3dcd2f24 (diff)
downloadfreebsd-puma-8a961f55040ca90b680b954b02b5cc9d6afec09e.tar.gz
freebsd-puma-8a961f55040ca90b680b954b02b5cc9d6afec09e.tar.bz2
freebsd-puma-8a961f55040ca90b680b954b02b5cc9d6afec09e.zip
add directions on starting and stopping unicorn
-rw-r--r--README.md37
1 files changed, 29 insertions, 8 deletions
diff --git a/README.md b/README.md
index 3cda65c..73e33ca 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-freebsd-unicorn
-===============
+# freebsd-unicorn
+
A robust init script for running unicorn on FreeBSD
@@ -9,8 +9,8 @@ Simply place the `unicorn` script in your `/usr/local/etc/rc.d` directory, modif
This has been tested on **FreeBSD 9.0 and 9.1**
-Making sure unicorn starts after your database launches
--------------------------------------------------------
+
+## Make sure unicorn starts after your database launches!
The only thing you might need to configure in the rc script is to change the `REQUIRES` line to specify your database (I use PostreSQL so that's what's in the repo)
@@ -24,6 +24,7 @@ to
You might need to add other services to this list if your Rails application requires them.
+
### Quick Setup
To get up and running quickly, adjust the `REQUIRES` line like above, and add edit your `/etc/rc.conf`:
@@ -51,14 +52,34 @@ For Non-Capistrano-like layouts:
# Uncomment this if using a different RAILS_ENV/RACK_ENV than production
#unicorn_env="production"
-
-Edit `/etc/rc.conf` to meet your needs
--------------------------------------------
+
+### Starting/Stopping/Restarting and Upgrading Unicorn
+
+You can now start Unicorn like any other FreeBSD service:
+
+ /usr/local/etc/rc.d/unicorn start
+
+There's also a handy `show` command to look at your final Unicorn configuration:
+
+ /usr/local/etc/rc.d/unicorn show
+
+You can do an old-fashioned restart, or a [zero-downtime upgrade][unicorn-0-downtime] with these commands:
+
+ /usr/local/etc/rc.d/unicorn restart
+ /usr/local/etc/rc.d/unicorn upgrade
+
+And when you're done riding Unicorns, you can shut it down
+
+ /usr/local/etc/rc.d/unicorn stop
+
+
+## Edit `/etc/rc.conf` to meet your needs
+
### Using a Capistrano directory layout
-The rc script does as much as possible to help you out. If you are using capistrano, or a capistrano-like directory structure, then you can just specify the directory of your application (the parent directory of `current`):
+The rc script does as much as possible to help you out. If you are using Capistrano, or a Capistrano-like directory structure, then you can just specify the directory of your application (the parent directory of `current`):
unicorn_enable="YES"
unicorn_directory="/u/application"