1 % rainbows(1) Rainbows! User Manual
2 % Rainbows! Hackers <rainbows-public@bogomips.org>
7 rainbows - rackup-like command to launch Rainbows!
11 rainbows [-c CONFIG_FILE] [-E RACK_ENV] [-D] [RACKUP_FILE]
15 A rackup(1)-like command to launch Rack applications using Rainbows!.
16 It is expected to be started in your application root (APP_ROOT),
17 but the "working_directory" directive may be used in the CONFIG_FILE.
19 While Rainbows! takes a myriad of command-line options for
20 compatibility with ruby(1) and rackup(1), it is recommended to stick
21 to the few command-line options specified in the SYNOPSIS and use
22 the CONFIG_FILE as much as possible.
26 This defaults to \"config.ru\" in APP_ROOT. It should be the same
27 file used by rackup(1) and other Rack launchers, it uses the
30 Embedded command-line options are mostly parsed for compatibility
31 with rackup(1) but strongly discouraged.
34 -c, \--config-file CONFIG_FILE
35 : Path to the Unicorn-specific config file. The config file is
36 implemented as a Ruby DSL, so Ruby code may executed.
37 See the RDoc/ri for the *Unicorn::Configurator* class for the full
38 list of directives available from the DSL.
41 : Run daemonized in the background. The process is detached from
42 the controlling terminal and stdin is redirected to "/dev/null".
43 Unlike many common UNIX daemons, we do not chdir to \"/\"
44 upon daemonization to allow more control over the startup/upgrade
46 Unless specified in the CONFIG_FILE, stderr and stdout will
47 also be redirected to "/dev/null".
50 : Run under the given RACK_ENV. See the RACK ENVIRONMENT section
54 : Listens on a given ADDRESS. ADDRESS may be in the form of
55 HOST:PORT or PATH, HOST:PORT is taken to mean a TCP socket
56 and PATH is meant to be a path to a UNIX domain socket.
57 Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080)
58 For production deployments, specifying the "listen" directive in
59 CONFIG_FILE is recommended as it allows fine-tuning of socket
61 -N, \--no-default-middleware
62 : Disables loading middleware implied by RACK_ENV. This bypasses the
63 configuration documented in the RACK ENVIRONMENT section, but still
64 allows RACK_ENV to be used for application/framework-specific purposes.
66 # RACKUP COMPATIBILITY OPTIONS
68 : Listen on a TCP socket belonging to HOST, default is
69 "0.0.0.0" (all addresses).
70 If specified multiple times on the command-line, only the
71 last-specified value takes effect.
72 This option only exists for compatibility with the rackup(1) command,
73 use of "-l"/"\--listen" switch is recommended instead.
76 : Listen on the specified TCP PORT, default is 8080.
77 If specified multiple times on the command-line, only the last-specified
79 This option only exists for compatibility with the rackup(1) command,
80 use of "-l"/"\--listen" switch is recommended instead.
83 : No-op, this exists only for compatibility with rackup(1).
87 : Evaluate a LINE of Ruby code. This evaluation happens
88 immediately as the command-line is being parsed.
91 : Turn on debug mode, the $DEBUG variable is set to true.
94 : Turn on verbose warnings, the $VERBOSE variable is set to true.
97 : specify $LOAD_PATH. PATH will be prepended to $LOAD_PATH.
98 The \':\' character may be used to delimit multiple directories.
99 This directive may be used more than once. Modifications to
100 $LOAD_PATH take place immediately and in the order they were
101 specified on the command-line.
103 -r, \--require LIBRARY
104 : require a specified LIBRARY before executing the application. The
105 \"require\" statement will be executed immediately and in the order
106 they were specified on the command-line.
110 The following UNIX signals may be sent to the master process:
112 * HUP - reload config file, app, and gracefully restart all workers
113 * INT/TERM - quick shutdown, kills all workers immediately
114 * QUIT - graceful shutdown, waits for workers to finish their
115 current request before finishing.
116 * USR1 - reopen all logs owned by the master and all workers
117 See Unicorn::Util.reopen_logs for what is considered a log.
118 * USR2 - reexecute the running binary. A separate QUIT
119 should be sent to the original process once the child is verified to
121 * WINCH - gracefully stops workers but keep the master running.
122 This will only work for daemonized processes.
123 * TTIN - increment the number of worker processes by one
124 * TTOU - decrement the number of worker processes by one
126 See the [SIGNALS][4] document for full description of all signals
131 Accepted values of RACK_ENV and the middleware they automatically load
132 (outside of RACKUP_FILE) are exactly as those in rackup(1):
134 * development - loads Rack::CommonLogger, Rack::ShowExceptions, and
135 Rack::Lint middleware
136 * deployment - loads Rack::CommonLogger middleware
137 * none - loads no middleware at all, relying
138 entirely on RACKUP_FILE
140 All unrecognized values for RACK_ENV are assumed to be
141 "none". Production deployments are strongly encouraged to use
142 "deployment" or "none" for maximum performance.
144 Note the Rack::ContentLength and Rack::Chunked middlewares are also
145 loaded by "deployment" and "development", but no other values of
146 RACK_ENV. If needed, they must be individually specified in the
147 RACKUP_FILE, some frameworks do not require them.
152 * *Rack::Builder* ri/RDoc
153 * *Unicorn::Configurator* ri/RDoc
154 * [Rainbows! RDoc][1]
158 [1]: http://rainbows.bogomips.org/
159 [2]: http://rdoc.info/gems/r#/gems/rack/frames
160 [3]: http://wiki.github.com/rack/rack/tutorial-rackup-howto
161 [4]: http://rainbows.bogomips.org/SIGNALS.html