rainbows(1)
β¨ rainbows(1) β¨
okay bestie, welcome to the rainbows(1) page from the General Commands Manual β she's giving classic UNIX manpage energy but make it cute, and we're gonna go through everything, no skipping, no cap π
π NAME π
rainbows β a rackup-like command to launch Rainbows!
πΈ SYNOPSIS πΈ
rainbows [-c CONFIG_FILE] [-E RACK_ENV] [-D] [RACKUP_FILE]
π¦ DESCRIPTION π¦
So basically, rainbows is a rackup(1)-like command that launches Rack applications using Rainbows!. You're expected to start it up in your application root (APP_ROOT), but lowkey you can also use the "working_directory" directive inside the CONFIG_FILE if you wanna be fancy.
Now, Rainbows! takes a myriad of command-line options for compatibility with ruby(1) and rackup(1) β like, so many β but here's the tea: it's recommended to stick to the few command-line options listed in the SYNOPSIS and use the CONFIG_FILE as much as possible. Periodt. π
π RACKUP FILE π
This defaults to "config.ru" in APP_ROOT. It should be the same file used by rackup(1) and other Rack launchers β it uses the Rack::Builder DSL, iykyk.
Embedded command-line options are mostly parsed for compatibility with rackup(1) but are strongly discouraged. Like, don't do it, bestie. π
π UNICORN OPTIONS π
-c,--config-file CONFIG_FILEβ the path to the Unicorn-specific config file. This config file is implemented as a Ruby DSL, so Ruby code may be executed in it (yes, for real, so be careful who you trust π). Check the RDoc/ri for theUnicorn::Configuratorclass for the full list of directives available from the DSL.-D,--daemonizeβ run daemonized in the background. The process gets detached from the controlling terminal andstdinis redirected to"/dev/null". And unlike many common UNIX daemons, we do not chdir to"/"upon daemonization β that's so we get more control over the startup/upgrade process. Unless it's specified in theCONFIG_FILE,stderrandstdoutwill also be redirected to"/dev/null".-E,--env RACK_ENVβ run under the givenRACK_ENV. Peep the RACK ENVIRONMENT section below for more deets.-l,--listen ADDRESSβ listens on a givenADDRESS.ADDRESSmay be in the form ofHOST:PORTorPATHβHOST:PORTis taken to mean a TCP socket, andPATHis meant to be a path to a UNIX domain socket. Defaults to"0.0.0.0:8080"(all addresses on TCP port 8080). For production deployments, specifying the"listen"directive inCONFIG_FILEis recommended since it allows fine-tuning of socket options. β¨-N,--no-default-middlewareβ disables loading middleware implied byRACK_ENV. This bypasses the configuration documented in the RACK ENVIRONMENT section, but still allowsRACK_ENVto be used for application/framework-specific purposes.
π RACKUP COMPATIBILITY OPTIONS π
-o,--host HOSTβ listen on a TCP socket belonging toHOST, default is"0.0.0.0"(all addresses). If specified multiple times on the command-line, only the last-specified value takes effect. This option only exists for compatibility with therackup(1)command β use of the"-l"/"--listen"switch is recommended instead.-p,--port PORTβ listen on the specified TCPPORT, default is8080. If specified multiple times on the command-line, only the last-specified value takes effect. This option only exists for compatibility with therackup(1)command β use of the"-l"/"--listen"switch is recommended instead.-s,--server SERVERβ a no-op. This exists only for compatibility withrackup(1). That's it, that's the whole vibe. π
β RUBY OPTIONS β
-e,--eval LINEβ evaluate aLINEof Ruby code. This evaluation happens immediately as the command-line is being parsed.-d,--debugβ turn on debug mode, the$DEBUGvariable is set totrue.-w,--warnβ turn on verbose warnings, the$VERBOSEvariable is set totrue.-I,--include PATHβ specify$LOAD_PATH.PATHwill be prepended to$LOAD_PATH. The':'character may be used to delimit multiple directories. This directive may be used more than once. Modifications to$LOAD_PATHtake place immediately and in the order they were specified on the command-line.-r,--require LIBRARYβ require a specifiedLIBRARYbefore executing the application. The"require"statement will be executed immediately and in the order they were specified on the command-line.
π₯ SIGNALS π₯
The following UNIX signals may be sent to the master process:
HUPβ reload config file, app, and gracefully restart all workersINT/TERMβ quick shutdown, kills all workers immediatelyQUITβ graceful shutdown, waits for workers to finish their current request before finishing.USR1β reopen all logs owned by the master and all workers. SeeUnicorn::Util.reopen_logsfor what is considered a log.USR2β reexecute the running binary. A separateQUITshould be sent to the original process once the child is verified to be up and running.WINCHβ gracefully stops workers but keep the master running. This will only work for daemonized processes.TTINβ increment the number of worker processes by oneTTOUβ decrement the number of worker processes by one
See the SIGNALS (http://rainbows.bogomips.org/SIGNALS.html) document for full description of all signals used by Rainbows!.
π§ RACK ENVIRONMENT π§
Accepted values of RACK_ENV and the middleware they automatically load (outside of RACKUP_FILE) are exactly as those in rackup(1):
developmentβ loadsRack::CommonLogger,Rack::ShowExceptions, andRack::Lintmiddlewaredeploymentβ loadsRack::CommonLoggermiddlewarenoneβ loads no middleware at all, relying entirely onRACKUP_FILE
All unrecognized values for RACK_ENV are assumed to be "none". Production deployments are strongly encouraged to use "deployment" or "none" for maximum performance. π
Note theRack::ContentLengthandRack::Chunkedmiddlewares are also loaded by"deployment"and"development", but no other values ofRACK_ENV. If needed, they must be individually specified in theRACKUP_FILEβ some frameworks do not require them.
π«Ά SEE ALSO π«Ά
unicorn(1)Rack::Builderri/RDocUnicorn::Configuratorri/RDoc- Rainbows! RDoc (http://rainbows.bogomips.org/)
- Rack RDoc (http://rdoc.info/gems/r#/gems/rack/frames)
- Rackup HowTo (http://wiki.github.com/rack/rack/tutorial-rackup-howto)
π AUTHORS π
Rainbows! Hackers <rainbows-public@bogomips.org>.
and that's the whole page, bestie π this was the Rainbows! User Manual, dated December 3, 2009, and yes, it's still filed under rainbows(1) β go forth and slay your deployments β¨πΈ
π¦ where this page comes from
- debian bookworm: rainbows 5.0.0-2.1 Β· Ruby OR GPL-2.0-or-later
- ubuntu jammy: rainbows 5.0.0-2 Β· Ruby OR GPL-2.0-or-later
- ubuntu noble: rainbows 5.0.0-2.1 Β· Ruby OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms