mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Making the website more pretty.
This commit is contained in:
parent
7c671b72cc
commit
c07f2f2ff2
@ -90,14 +90,14 @@ class Page(object):
|
||||
|
||||
basename, oldext = os.path.splitext(filename)
|
||||
oldext = oldext.lower()[1:]
|
||||
converter = getattr(self, "convert_%s" % oldext, lambda x: x)
|
||||
converter = getattr(self, "convert_%s" % oldext, lambda x: (None, x))
|
||||
if "insert_settings" in self.headers:
|
||||
body = body % {"settings": self.format_settings()}
|
||||
self.body = converter(body)
|
||||
self.toc, self.body = converter(body)
|
||||
|
||||
newext = self.headers.get('ext', '.html')
|
||||
self.target = os.path.join(tgt_path, "%s%s" % (basename, newext))
|
||||
|
||||
|
||||
def url(self):
|
||||
path = self.target.split(conf.OUTPUT_PATH)[1].lstrip('/')
|
||||
return "/".join([self.site.url, path])
|
||||
@ -126,6 +126,7 @@ class Page(object):
|
||||
|
||||
kwargs = {
|
||||
"conf": conf,
|
||||
"toc": self.toc,
|
||||
"body": self.body,
|
||||
"url": self.url()
|
||||
}
|
||||
@ -139,7 +140,21 @@ class Page(object):
|
||||
writer_name="html",
|
||||
settings_overrides=overrides
|
||||
)
|
||||
return parts['html_body']
|
||||
lines = parts['html_body'].splitlines()
|
||||
|
||||
toppos, botpos = None, None
|
||||
for idx, line in enumerate(lines):
|
||||
if line.find("_TOC_TOP_") >= 0:
|
||||
toppos = idx
|
||||
elif line.find("_TOC_BOT_") >= 0:
|
||||
botpos = idx
|
||||
|
||||
if toppos is None or botpos is None:
|
||||
return None, parts['html_body']
|
||||
|
||||
toc = lines[toppos+1:botpos]
|
||||
body = lines[:toppos] + lines[botpos+1:]
|
||||
return '\n'.join(toc), '\n'.join(body)
|
||||
|
||||
def format_settings(self):
|
||||
currdir = os.path.dirname(__file__)
|
||||
@ -149,10 +164,10 @@ class Page(object):
|
||||
for i, s in enumerate(guncfg.KNOWN_SETTINGS):
|
||||
if i == 0 or s.section != guncfg.KNOWN_SETTINGS[i-1].section:
|
||||
ret.append("%s\n%s\n\n" % (s.section, "+" * len(s.section)))
|
||||
ret.append(self.fmt_setting2(s))
|
||||
ret.append(self.fmt_setting(s))
|
||||
return ''.join(ret)
|
||||
|
||||
def fmt_setting2(self, s):
|
||||
def fmt_setting(self, s):
|
||||
if callable(s.default):
|
||||
val = inspect.getsource(s.default)
|
||||
val = "\n".join(" %s" % l for l in val.splitlines())
|
||||
@ -179,53 +194,6 @@ class Page(object):
|
||||
out.append("")
|
||||
return "\n".join(out)
|
||||
|
||||
def fmt_setting(self, s):
|
||||
out = []
|
||||
lines = s.desc.splitlines()
|
||||
width = max(map(lambda x: len(x), lines))
|
||||
|
||||
if not callable(s.default):
|
||||
val = '%s' % s.default
|
||||
else:
|
||||
val = ''
|
||||
|
||||
if s.cli and s.meta:
|
||||
args = ["%s %s" % (arg, s.meta) for arg in s.cli]
|
||||
cli = ', '.join(args)
|
||||
elif s.cli:
|
||||
cli = ", ".join(s.cli)
|
||||
else:
|
||||
cli = "N/A"
|
||||
|
||||
width = 80
|
||||
namelen = 20
|
||||
deflen = 20
|
||||
clilen = width - (namelen + deflen + 4)
|
||||
|
||||
args = ("-" * namelen, "-" * deflen, "-" * clilen)
|
||||
out.append("+%s+%s+%s+" % args)
|
||||
|
||||
names = "| %s" % s.name
|
||||
names += " " * (namelen - (len(s.name) + 2))
|
||||
names += " | %s" % val
|
||||
names += " " * (deflen - (len(val) + 2))
|
||||
names += " | %s" % cli
|
||||
names += " " * (clilen - (len(cli) + 1))
|
||||
names += "|"
|
||||
out.append(names)
|
||||
|
||||
out.append(out[0].replace("-", "="))
|
||||
|
||||
for l in lines:
|
||||
l = l.rstrip("\n")
|
||||
if len(l) < width:
|
||||
l += " " * ((width - 2) - len(l))
|
||||
out.append("|%s|" % l)
|
||||
out.append("+%s+" % ("-" * (width - 2)))
|
||||
out.extend(["", ""])
|
||||
|
||||
return "\n".join(out)
|
||||
|
||||
def main():
|
||||
Site().render()
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
require 'ninesixty'
|
||||
# Require any additional compass plugins here.
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
css_dir = "htdocs/css"
|
||||
sass_dir = "css"
|
||||
images_dir = "images"
|
||||
preferred_syntax = :sass
|
||||
|
||||
74
doc/css/index.sass
Normal file
74
doc/css/index.sass
Normal file
@ -0,0 +1,74 @@
|
||||
@import 960/grid
|
||||
@import 960/text
|
||||
|
||||
@import compass/css3
|
||||
@import compass/layout.scss
|
||||
@import compass/utilities/general
|
||||
@import compass/utilities/lists
|
||||
|
||||
@import compass/reset
|
||||
|
||||
// Index Layout
|
||||
|
||||
$ninesixty-columns: 24
|
||||
|
||||
#container.landing
|
||||
+grid-container
|
||||
#menu, #header, div.blurb, #tutorial, #actions, #footer
|
||||
+grid-unit-base
|
||||
#menu, #header, #footer
|
||||
+grid-width(24)
|
||||
#actions
|
||||
div.blurb
|
||||
+grid-width(8)
|
||||
#tutorial
|
||||
+grid-width(16)
|
||||
|
||||
+text
|
||||
|
||||
a, a:visited, a:hover, a:active
|
||||
color: #569633
|
||||
text-decoration: none
|
||||
|
||||
#header
|
||||
margin: 46px 0px
|
||||
|
||||
#menu
|
||||
margin-bottom: 23px
|
||||
+border-bottom-radius(10px)
|
||||
background-color: #959595
|
||||
text-align: right
|
||||
div.logo
|
||||
float: left
|
||||
margin-left: 10px
|
||||
padding-top: 3px
|
||||
ul
|
||||
display: inline
|
||||
margin-right: 10px
|
||||
+no-bullets
|
||||
li
|
||||
display: inline
|
||||
padding: 0px 3px
|
||||
a
|
||||
font-size: 17px
|
||||
color: white
|
||||
|
||||
#footer
|
||||
border-top: 1px solid #959595
|
||||
padding: 10px 0px
|
||||
text-align: center
|
||||
color: #959595
|
||||
p
|
||||
margin-bottom: 5px
|
||||
|
||||
pre, tt
|
||||
font-family: 'Andale Mono', 'Lucida Console', monospace
|
||||
font-size: 12px
|
||||
|
||||
pre
|
||||
white-space: pre
|
||||
background-color: #000000
|
||||
color: #00FF00
|
||||
margin: 5px
|
||||
margin-bottom: 20px
|
||||
padding: 5px
|
||||
@ -1,131 +1,89 @@
|
||||
@import 960/grid
|
||||
@import 960/text
|
||||
|
||||
@import compass/css3
|
||||
@import compass/reset
|
||||
@import compass/layout.scss
|
||||
@import compass/utilities/general
|
||||
@import compass/utilities/lists
|
||||
|
||||
$separator: #CCCCCC
|
||||
@import compass/reset
|
||||
|
||||
$size_body_width: 60em
|
||||
$size_toc_width: 250px
|
||||
$ninesixty-columns: 24
|
||||
|
||||
$color_a: #569633
|
||||
$color_bg: #F9F9F9
|
||||
$color_font: #2A2A2A
|
||||
$color_footer_a: #444444
|
||||
$color_footer_border: #CCCCCC
|
||||
$color_headings: #489848
|
||||
$color_headings_border: #CCCCCC
|
||||
$color_menu_border: #BBBBBB
|
||||
$color_menu_a: #489848
|
||||
$color_note_before: #489848
|
||||
$color_note_border: #489848
|
||||
$color_pre_bg: #FFFFDD
|
||||
$color_th_border: #000000
|
||||
// Layout
|
||||
|
||||
#container.twocolumn
|
||||
+grid-container
|
||||
#header, #menu, #footer, #toc, #content
|
||||
+grid-unit-base
|
||||
#header, #menu, #footer
|
||||
+grid-width(24)
|
||||
#toc
|
||||
+grid-width(8)
|
||||
#content
|
||||
+grid-width(16)
|
||||
|
||||
// Text
|
||||
|
||||
+text
|
||||
|
||||
body
|
||||
background: $color_bg
|
||||
color: $color_font
|
||||
line-height: 18px
|
||||
font-family: Arial, sans-serif
|
||||
font-size: 100%
|
||||
font-family: Helvetica, Arial, sans-serif
|
||||
|
||||
div.container
|
||||
display: block
|
||||
width: $size_body_width
|
||||
margin: 0 auto
|
||||
a, a:visited, a:hover, a:active
|
||||
color: #569633
|
||||
text-decoration: none
|
||||
|
||||
#header
|
||||
margin: 1em auto
|
||||
text-align: center
|
||||
// Style
|
||||
|
||||
#menu
|
||||
width: 100%
|
||||
margin: 1em 0 1.4em 0
|
||||
border-bottom: 1px solid $color_menu_border
|
||||
text-align: center
|
||||
margin-bottom: 23px
|
||||
+border-bottom-radius(10px)
|
||||
background-color: #959595
|
||||
text-align: right
|
||||
div.logo
|
||||
float: left
|
||||
margin-left: 10px
|
||||
padding-top: 3px
|
||||
ul
|
||||
+no-bullets
|
||||
display: inline
|
||||
margin-right: 10px
|
||||
+no-bullets
|
||||
li
|
||||
display: inline
|
||||
margin-right: 15px
|
||||
text-align: center
|
||||
padding: 0px 3px
|
||||
a
|
||||
font-size: 20px
|
||||
font-weight: 700
|
||||
color: $color_menu_a
|
||||
text-decoration: none
|
||||
font-size: 17px
|
||||
color: white
|
||||
|
||||
#contents.sidebar
|
||||
float: right
|
||||
border-left: 1px solid $color_menu_border
|
||||
width: $size_toc_width
|
||||
ul
|
||||
margin-bottom: 0.2em
|
||||
div.document
|
||||
border-right: 1px solid #959595
|
||||
padding-right: 15px
|
||||
|
||||
#toc
|
||||
ul ul
|
||||
list-style: disc
|
||||
ul ul ul
|
||||
list-style: circle
|
||||
|
||||
p.topic-title
|
||||
display: none
|
||||
|
||||
div.section
|
||||
margin-right: $size_toc_width + 20px
|
||||
|
||||
div.section div.section
|
||||
margin-right: 0
|
||||
|
||||
div.section ul
|
||||
margin-left: 15px
|
||||
+no-bullets
|
||||
|
||||
h1, h2, h3, h4
|
||||
color: $color_headings
|
||||
|
||||
h1
|
||||
margin-top: 10px
|
||||
font-size: 26px
|
||||
|
||||
h2
|
||||
border-bottom: 5px solid $color_headings_border
|
||||
margin-bottom: 13px
|
||||
padding-bottom: 3px
|
||||
font-size: 20px
|
||||
font-weight: 700
|
||||
|
||||
h3
|
||||
border-bottom: 1px solid $color_headings_border
|
||||
margin-bottom: 13px
|
||||
font-weight: 700
|
||||
|
||||
a
|
||||
color: $color_a
|
||||
text-decoration: none
|
||||
|
||||
p
|
||||
margin-bottom: 1em
|
||||
font-size: 1em
|
||||
|
||||
ol
|
||||
list-style: decimal
|
||||
margin-left: 2em
|
||||
margin-bottom: 13px
|
||||
|
||||
ul
|
||||
list-style: disc
|
||||
margin-left: 2em
|
||||
margin-bottom: 13px
|
||||
|
||||
pre, tt
|
||||
font-family: 'andale mono', 'lucida console', monospace
|
||||
font-family: 'Andale Mono', 'Lucida Console', monospace
|
||||
font-size: 12px
|
||||
background: $color_pre_bg
|
||||
|
||||
pre
|
||||
white-space: pre
|
||||
margin: 3px 3px 2em 3px
|
||||
padding: 8px 20px
|
||||
background-color: #000000
|
||||
color: #00FF00
|
||||
margin: 5px
|
||||
margin-bottom: 20px
|
||||
padding: 5px
|
||||
|
||||
.note
|
||||
border-top: 1px solid $color_note_border
|
||||
border-bottom: 1px solid $color_note_border
|
||||
border-top: 1px solid #569633
|
||||
border-bottom: 1px solid #569633
|
||||
padding: .6em .6em .6em 80px
|
||||
margin-bottom: 2em
|
||||
position: relative
|
||||
@ -133,9 +91,8 @@ pre
|
||||
content: "!"
|
||||
font-size: 60px
|
||||
font-weight: bold
|
||||
color: $color_note_before
|
||||
color: #FF0000
|
||||
position: absolute
|
||||
top: 30px
|
||||
left: 30px
|
||||
font-family: helvetica,arial
|
||||
p.admonition-title
|
||||
@ -148,13 +105,9 @@ pre
|
||||
margin: 0
|
||||
|
||||
#footer
|
||||
border-top: 1px solid $color_footer_border
|
||||
clear: both
|
||||
display: block
|
||||
width: 100%
|
||||
margin-top: 3em
|
||||
padding-top: 1em
|
||||
border-top: 1px solid #959595
|
||||
padding: 10px 0px
|
||||
text-align: center
|
||||
font-size: 0.8em
|
||||
a
|
||||
color: $color_footer_a
|
||||
color: #959595
|
||||
p
|
||||
margin-bottom: 5px
|
||||
@ -7,19 +7,19 @@
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
@ -27,70 +27,6 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="contents sidebar topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#overview" id="id1">Overview</a></li>
|
||||
<li><a class="reference internal" href="#framework-settings" id="id2">Framework Settings</a><ul>
|
||||
<li><a class="reference internal" href="#paster-applications" id="id3">Paster Applications</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#configuration-file" id="id4">Configuration File</a></li>
|
||||
<li><a class="reference internal" href="#command-line" id="id5">Command Line</a></li>
|
||||
<li><a class="reference internal" href="#settings" id="id6">Settings</a><ul>
|
||||
<li><a class="reference internal" href="#config-file" id="id7">Config File</a><ul>
|
||||
<li><a class="reference internal" href="#config" id="id8">config</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-socket" id="id9">Server Socket</a><ul>
|
||||
<li><a class="reference internal" href="#bind" id="id10">bind</a></li>
|
||||
<li><a class="reference internal" href="#backlog" id="id11">backlog</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#worker-processes" id="id12">Worker Processes</a><ul>
|
||||
<li><a class="reference internal" href="#workers" id="id13">workers</a></li>
|
||||
<li><a class="reference internal" href="#worker-class" id="id14">worker_class</a></li>
|
||||
<li><a class="reference internal" href="#worker-connections" id="id15">worker_connections</a></li>
|
||||
<li><a class="reference internal" href="#timeout" id="id16">timeout</a></li>
|
||||
<li><a class="reference internal" href="#keepalive" id="id17">keepalive</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#debugging" id="id18">Debugging</a><ul>
|
||||
<li><a class="reference internal" href="#debug" id="id19">debug</a></li>
|
||||
<li><a class="reference internal" href="#spew" id="id20">spew</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-mechanics" id="id21">Server Mechanics</a><ul>
|
||||
<li><a class="reference internal" href="#preload-app" id="id22">preload_app</a></li>
|
||||
<li><a class="reference internal" href="#daemon" id="id23">daemon</a></li>
|
||||
<li><a class="reference internal" href="#pidfile" id="id24">pidfile</a></li>
|
||||
<li><a class="reference internal" href="#user" id="id25">user</a></li>
|
||||
<li><a class="reference internal" href="#group" id="id26">group</a></li>
|
||||
<li><a class="reference internal" href="#umask" id="id27">umask</a></li>
|
||||
<li><a class="reference internal" href="#tmp-upload-dir" id="id28">tmp_upload_dir</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#logging" id="id29">Logging</a><ul>
|
||||
<li><a class="reference internal" href="#logfile" id="id30">logfile</a></li>
|
||||
<li><a class="reference internal" href="#loglevel" id="id31">loglevel</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#process-naming" id="id32">Process Naming</a><ul>
|
||||
<li><a class="reference internal" href="#proc-name" id="id33">proc_name</a></li>
|
||||
<li><a class="reference internal" href="#default-proc-name" id="id34">default_proc_name</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-hooks" id="id35">Server Hooks</a><ul>
|
||||
<li><a class="reference internal" href="#pre-fork" id="id36">pre_fork</a></li>
|
||||
<li><a class="reference internal" href="#post-fork" id="id37">post_fork</a></li>
|
||||
<li><a class="reference internal" href="#when-ready" id="id38">when_ready</a></li>
|
||||
<li><a class="reference internal" href="#pre-exec" id="id39">pre_exec</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="overview">
|
||||
<h2><a class="toc-backref" href="#contents">Overview</a></h2>
|
||||
<p>Gunicorn pulls configuration information from three distinct places.</p>
|
||||
@ -485,10 +421,75 @@ def def_pre_exec(server):
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#overview" id="id1">Overview</a></li>
|
||||
<li><a class="reference internal" href="#framework-settings" id="id2">Framework Settings</a><ul>
|
||||
<li><a class="reference internal" href="#paster-applications" id="id3">Paster Applications</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#configuration-file" id="id4">Configuration File</a></li>
|
||||
<li><a class="reference internal" href="#command-line" id="id5">Command Line</a></li>
|
||||
<li><a class="reference internal" href="#settings" id="id6">Settings</a><ul>
|
||||
<li><a class="reference internal" href="#config-file" id="id7">Config File</a><ul>
|
||||
<li><a class="reference internal" href="#config" id="id8">config</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-socket" id="id9">Server Socket</a><ul>
|
||||
<li><a class="reference internal" href="#bind" id="id10">bind</a></li>
|
||||
<li><a class="reference internal" href="#backlog" id="id11">backlog</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#worker-processes" id="id12">Worker Processes</a><ul>
|
||||
<li><a class="reference internal" href="#workers" id="id13">workers</a></li>
|
||||
<li><a class="reference internal" href="#worker-class" id="id14">worker_class</a></li>
|
||||
<li><a class="reference internal" href="#worker-connections" id="id15">worker_connections</a></li>
|
||||
<li><a class="reference internal" href="#timeout" id="id16">timeout</a></li>
|
||||
<li><a class="reference internal" href="#keepalive" id="id17">keepalive</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#debugging" id="id18">Debugging</a><ul>
|
||||
<li><a class="reference internal" href="#debug" id="id19">debug</a></li>
|
||||
<li><a class="reference internal" href="#spew" id="id20">spew</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-mechanics" id="id21">Server Mechanics</a><ul>
|
||||
<li><a class="reference internal" href="#preload-app" id="id22">preload_app</a></li>
|
||||
<li><a class="reference internal" href="#daemon" id="id23">daemon</a></li>
|
||||
<li><a class="reference internal" href="#pidfile" id="id24">pidfile</a></li>
|
||||
<li><a class="reference internal" href="#user" id="id25">user</a></li>
|
||||
<li><a class="reference internal" href="#group" id="id26">group</a></li>
|
||||
<li><a class="reference internal" href="#umask" id="id27">umask</a></li>
|
||||
<li><a class="reference internal" href="#tmp-upload-dir" id="id28">tmp_upload_dir</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#logging" id="id29">Logging</a><ul>
|
||||
<li><a class="reference internal" href="#logfile" id="id30">logfile</a></li>
|
||||
<li><a class="reference internal" href="#loglevel" id="id31">loglevel</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#process-naming" id="id32">Process Naming</a><ul>
|
||||
<li><a class="reference internal" href="#proc-name" id="id33">proc_name</a></li>
|
||||
<li><a class="reference internal" href="#default-proc-name" id="id34">default_proc_name</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-hooks" id="id35">Server Hooks</a><ul>
|
||||
<li><a class="reference internal" href="#pre-fork" id="id36">pre_fork</a></li>
|
||||
<li><a class="reference internal" href="#post-fork" id="id37">post_fork</a></li>
|
||||
<li><a class="reference internal" href="#when-ready" id="id38">when_ready</a></li>
|
||||
<li><a class="reference internal" href="#pre-exec" id="id39">pre_exec</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
254
doc/htdocs/css/index.css
Normal file
254
doc/htdocs/css/index.css
Normal file
@ -0,0 +1,254 @@
|
||||
/* line 14, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
font-size: 100%;
|
||||
font-family: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/* line 17, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
body {
|
||||
line-height: 1;
|
||||
color: black;
|
||||
background: white;
|
||||
}
|
||||
|
||||
/* line 19, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* line 21, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* line 23, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
caption, th, td {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* line 25, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
q, blockquote {
|
||||
quotes: "" "";
|
||||
}
|
||||
/* line 96, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
q:before, q:after, blockquote:before, blockquote:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* line 27, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* line 15, ../../css/index.sass */
|
||||
#container.landing {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 960px;
|
||||
}
|
||||
/* line 17, ../../css/index.sass */
|
||||
#container.landing #menu, #container.landing #header, #container.landing div.blurb, #container.landing #tutorial, #container.landing #actions, #container.landing #footer {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
/* line 19, ../../css/index.sass */
|
||||
#container.landing #menu, #container.landing #header, #container.landing #footer {
|
||||
width: 940px;
|
||||
}
|
||||
/* line 22, ../../css/index.sass */
|
||||
#container.landing div.blurb {
|
||||
width: 300px;
|
||||
}
|
||||
/* line 24, ../../css/index.sass */
|
||||
#container.landing #tutorial {
|
||||
width: 620px;
|
||||
}
|
||||
|
||||
/* line 4, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
body {
|
||||
font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
|
||||
}
|
||||
|
||||
/* line 6, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
a:focus {
|
||||
outline: 1px dotted invert;
|
||||
}
|
||||
|
||||
/* line 8, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
hr {
|
||||
border-color: #cccccc;
|
||||
border-style: solid;
|
||||
border-width: 1px 0 0;
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* line 14, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h1 {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
/* line 16, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h2 {
|
||||
font-size: 23px;
|
||||
}
|
||||
|
||||
/* line 18, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h3 {
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
/* line 20, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h4 {
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
/* line 22, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h5 {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
/* line 24, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h6 {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* line 26, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
ol {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
/* line 28, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
ul {
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
/* line 30, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
li {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
/* line 32, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
p,
|
||||
dl,
|
||||
hr,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
ol,
|
||||
ul,
|
||||
pre,
|
||||
table,
|
||||
address,
|
||||
fieldset {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* line 29, ../../css/index.sass */
|
||||
a, a:visited, a:hover, a:active {
|
||||
color: #569633;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 33, ../../css/index.sass */
|
||||
#header {
|
||||
margin: 46px 0px;
|
||||
}
|
||||
|
||||
/* line 36, ../../css/index.sass */
|
||||
#menu {
|
||||
margin-bottom: 23px;
|
||||
-moz-border-radius-bottomleft: 10px;
|
||||
-webkit-border-bottom-left-radius: 10px;
|
||||
-o-border-bottom-left-radius: 10px;
|
||||
-ms-border-bottom-left-radius: 10px;
|
||||
-khtml-border-bottom-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
-moz-border-radius-bottomright: 10px;
|
||||
-webkit-border-bottom-right-radius: 10px;
|
||||
-o-border-bottom-right-radius: 10px;
|
||||
-ms-border-bottom-right-radius: 10px;
|
||||
-khtml-border-bottom-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
background-color: #959595;
|
||||
text-align: right;
|
||||
}
|
||||
/* line 41, ../../css/index.sass */
|
||||
#menu div.logo {
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
/* line 45, ../../css/index.sass */
|
||||
#menu ul {
|
||||
display: inline;
|
||||
margin-right: 10px;
|
||||
list-style: none;
|
||||
}
|
||||
/* line 11, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.scss */
|
||||
#menu ul li {
|
||||
list-style-image: none;
|
||||
list-style-type: none;
|
||||
margin-left: 0px;
|
||||
}
|
||||
/* line 49, ../../css/index.sass */
|
||||
#menu ul li {
|
||||
display: inline;
|
||||
padding: 0px 3px;
|
||||
}
|
||||
/* line 52, ../../css/index.sass */
|
||||
#menu ul li a {
|
||||
font-size: 17px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* line 56, ../../css/index.sass */
|
||||
#footer {
|
||||
border-top: 1px solid #959595;
|
||||
padding: 10px 0px;
|
||||
text-align: center;
|
||||
color: #959595;
|
||||
}
|
||||
/* line 61, ../../css/index.sass */
|
||||
#footer p {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* line 64, ../../css/index.sass */
|
||||
pre, tt {
|
||||
font-family: "Andale Mono", "Lucida Console", monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* line 68, ../../css/index.sass */
|
||||
pre {
|
||||
white-space: pre;
|
||||
background-color: black;
|
||||
color: lime;
|
||||
margin: 5px;
|
||||
margin-bottom: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
/* line 14, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 14, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
@ -18,249 +18,288 @@ table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/* line 17, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 17, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
body {
|
||||
line-height: 1;
|
||||
color: black;
|
||||
background: white;
|
||||
}
|
||||
|
||||
/* line 19, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 19, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* line 21, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 21, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* line 23, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 23, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
caption, th, td {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* line 25, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 25, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
q, blockquote {
|
||||
quotes: "" "";
|
||||
}
|
||||
/* line 96, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 96, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
q:before, q:after, blockquote:before, blockquote:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* line 27, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 27, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* line 25, ../../css/style.sass */
|
||||
/* line 15, ../../css/style.sass */
|
||||
#container.twocolumn {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 960px;
|
||||
}
|
||||
/* line 17, ../../css/style.sass */
|
||||
#container.twocolumn #header, #container.twocolumn #menu, #container.twocolumn #footer, #container.twocolumn #toc, #container.twocolumn #content {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
/* line 19, ../../css/style.sass */
|
||||
#container.twocolumn #header, #container.twocolumn #menu, #container.twocolumn #footer {
|
||||
width: 940px;
|
||||
}
|
||||
/* line 21, ../../css/style.sass */
|
||||
#container.twocolumn #toc {
|
||||
width: 300px;
|
||||
}
|
||||
/* line 23, ../../css/style.sass */
|
||||
#container.twocolumn #content {
|
||||
width: 620px;
|
||||
}
|
||||
|
||||
/* line 4, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
body {
|
||||
background: #f9f9f9;
|
||||
color: #2a2a2a;
|
||||
line-height: 18px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 100%;
|
||||
font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
|
||||
}
|
||||
|
||||
/* line 32, ../../css/style.sass */
|
||||
div.container {
|
||||
display: block;
|
||||
width: 60em;
|
||||
margin: 0 auto;
|
||||
/* line 6, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
a:focus {
|
||||
outline: 1px dotted invert;
|
||||
}
|
||||
|
||||
/* line 37, ../../css/style.sass */
|
||||
#header {
|
||||
margin: 1em auto;
|
||||
text-align: center;
|
||||
/* line 8, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
hr {
|
||||
border-color: #cccccc;
|
||||
border-style: solid;
|
||||
border-width: 1px 0 0;
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* line 41, ../../css/style.sass */
|
||||
#menu {
|
||||
width: 100%;
|
||||
margin: 1em 0 1.4em 0;
|
||||
border-bottom: 1px solid #bbbbbb;
|
||||
text-align: center;
|
||||
}
|
||||
/* line 46, ../../css/style.sass */
|
||||
#menu ul {
|
||||
list-style: none;
|
||||
display: inline;
|
||||
}
|
||||
/* line 11, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.scss */
|
||||
#menu ul li {
|
||||
list-style-image: none;
|
||||
list-style-type: none;
|
||||
margin-left: 0px;
|
||||
}
|
||||
/* line 49, ../../css/style.sass */
|
||||
#menu ul li {
|
||||
display: inline;
|
||||
margin-right: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
/* line 53, ../../css/style.sass */
|
||||
#menu ul li a {
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #489848;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 59, ../../css/style.sass */
|
||||
#contents.sidebar {
|
||||
float: right;
|
||||
border-left: 1px solid #bbbbbb;
|
||||
width: 250px;
|
||||
}
|
||||
/* line 63, ../../css/style.sass */
|
||||
#contents.sidebar ul {
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
/* line 66, ../../css/style.sass */
|
||||
p.topic-title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* line 69, ../../css/style.sass */
|
||||
div.section {
|
||||
margin-right: 270px;
|
||||
}
|
||||
|
||||
/* line 72, ../../css/style.sass */
|
||||
div.section div.section {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
/* line 75, ../../css/style.sass */
|
||||
div.section ul {
|
||||
margin-left: 15px;
|
||||
list-style: none;
|
||||
}
|
||||
/* line 11, ../../../../../../../.gem/ruby/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.scss */
|
||||
div.section ul li {
|
||||
list-style-image: none;
|
||||
list-style-type: none;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
/* line 79, ../../css/style.sass */
|
||||
h1, h2, h3, h4 {
|
||||
color: #489848;
|
||||
}
|
||||
|
||||
/* line 82, ../../css/style.sass */
|
||||
/* line 14, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h1 {
|
||||
margin-top: 10px;
|
||||
font-size: 26px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
/* line 86, ../../css/style.sass */
|
||||
/* line 16, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h2 {
|
||||
border-bottom: 5px solid #cccccc;
|
||||
margin-bottom: 13px;
|
||||
padding-bottom: 3px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
font-size: 23px;
|
||||
}
|
||||
|
||||
/* line 93, ../../css/style.sass */
|
||||
/* line 18, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h3 {
|
||||
border-bottom: 1px solid #cccccc;
|
||||
margin-bottom: 13px;
|
||||
font-weight: 700;
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
/* line 98, ../../css/style.sass */
|
||||
a {
|
||||
/* line 20, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h4 {
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
/* line 22, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h5 {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
/* line 24, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
h6 {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* line 26, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
ol {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
/* line 28, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
ul {
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
/* line 30, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
li {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
/* line 32, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.9.13/stylesheets/960/_text.sass */
|
||||
p,
|
||||
dl,
|
||||
hr,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
ol,
|
||||
ul,
|
||||
pre,
|
||||
table,
|
||||
address,
|
||||
fieldset {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* line 30, ../../css/style.sass */
|
||||
body {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* line 33, ../../css/style.sass */
|
||||
a, a:visited, a:hover, a:active {
|
||||
color: #569633;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 102, ../../css/style.sass */
|
||||
p {
|
||||
margin-bottom: 1em;
|
||||
font-size: 1em;
|
||||
/* line 39, ../../css/style.sass */
|
||||
#menu {
|
||||
margin-bottom: 23px;
|
||||
-moz-border-radius-bottomleft: 10px;
|
||||
-webkit-border-bottom-left-radius: 10px;
|
||||
-o-border-bottom-left-radius: 10px;
|
||||
-ms-border-bottom-left-radius: 10px;
|
||||
-khtml-border-bottom-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
-moz-border-radius-bottomright: 10px;
|
||||
-webkit-border-bottom-right-radius: 10px;
|
||||
-o-border-bottom-right-radius: 10px;
|
||||
-ms-border-bottom-right-radius: 10px;
|
||||
-khtml-border-bottom-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
background-color: #959595;
|
||||
text-align: right;
|
||||
}
|
||||
/* line 44, ../../css/style.sass */
|
||||
#menu div.logo {
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
/* line 48, ../../css/style.sass */
|
||||
#menu ul {
|
||||
display: inline;
|
||||
margin-right: 10px;
|
||||
list-style: none;
|
||||
}
|
||||
/* line 11, ../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.scss */
|
||||
#menu ul li {
|
||||
list-style-image: none;
|
||||
list-style-type: none;
|
||||
margin-left: 0px;
|
||||
}
|
||||
/* line 52, ../../css/style.sass */
|
||||
#menu ul li {
|
||||
display: inline;
|
||||
padding: 0px 3px;
|
||||
}
|
||||
/* line 55, ../../css/style.sass */
|
||||
#menu ul li a {
|
||||
font-size: 17px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* line 106, ../../css/style.sass */
|
||||
ol {
|
||||
list-style: decimal;
|
||||
margin-left: 2em;
|
||||
margin-bottom: 13px;
|
||||
/* line 59, ../../css/style.sass */
|
||||
div.document {
|
||||
border-right: 1px solid #959595;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
/* line 111, ../../css/style.sass */
|
||||
ul {
|
||||
/* line 64, ../../css/style.sass */
|
||||
#toc ul ul {
|
||||
list-style: disc;
|
||||
margin-left: 2em;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
/* line 66, ../../css/style.sass */
|
||||
#toc ul ul ul {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
/* line 116, ../../css/style.sass */
|
||||
/* line 69, ../../css/style.sass */
|
||||
p.topic-title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* line 72, ../../css/style.sass */
|
||||
pre, tt {
|
||||
font-family: "andale mono", "lucida console", monospace;
|
||||
font-family: "Andale Mono", "Lucida Console", monospace;
|
||||
font-size: 12px;
|
||||
background: #ffffdd;
|
||||
}
|
||||
|
||||
/* line 121, ../../css/style.sass */
|
||||
/* line 76, ../../css/style.sass */
|
||||
pre {
|
||||
white-space: pre;
|
||||
margin: 3px 3px 2em 3px;
|
||||
padding: 8px 20px;
|
||||
background-color: black;
|
||||
color: lime;
|
||||
margin: 5px;
|
||||
margin-bottom: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/* line 126, ../../css/style.sass */
|
||||
/* line 84, ../../css/style.sass */
|
||||
.note {
|
||||
border-top: 1px solid #489848;
|
||||
border-bottom: 1px solid #489848;
|
||||
border-top: 1px solid #569633;
|
||||
border-bottom: 1px solid #569633;
|
||||
padding: 0.6em 0.6em 0.6em 80px;
|
||||
margin-bottom: 2em;
|
||||
position: relative;
|
||||
}
|
||||
/* line 132, ../../css/style.sass */
|
||||
/* line 90, ../../css/style.sass */
|
||||
.note p.admonition-title:before {
|
||||
content: "!";
|
||||
font-size: 60px;
|
||||
font-weight: bold;
|
||||
color: #489848;
|
||||
color: red;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 30px;
|
||||
font-family: helvetica, arial;
|
||||
}
|
||||
/* line 141, ../../css/style.sass */
|
||||
/* line 98, ../../css/style.sass */
|
||||
.note p.admonition-title {
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
margin-bottom: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
/* line 146, ../../css/style.sass */
|
||||
/* line 103, ../../css/style.sass */
|
||||
.note p.last {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* line 150, ../../css/style.sass */
|
||||
/* line 107, ../../css/style.sass */
|
||||
#footer {
|
||||
border-top: 1px solid #cccccc;
|
||||
clear: both;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-top: 3em;
|
||||
padding-top: 1em;
|
||||
border-top: 1px solid #959595;
|
||||
padding: 10px 0px;
|
||||
text-align: center;
|
||||
font-size: 0.8em;
|
||||
color: #959595;
|
||||
}
|
||||
/* line 159, ../../css/style.sass */
|
||||
#footer a {
|
||||
color: #444444;
|
||||
/* line 112, ../../css/style.sass */
|
||||
#footer p {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@ -7,19 +7,19 @@
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
@ -27,18 +27,6 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="contents sidebar topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#nginx-configuration" id="id3">Nginx Configuration</a></li>
|
||||
<li><a class="reference internal" href="#using-virtualenv" id="id4">Using Virtualenv</a></li>
|
||||
<li><a class="reference internal" href="#monitoring" id="id5">Monitoring</a><ul>
|
||||
<li><a class="reference internal" href="#runit" id="id6">Runit</a></li>
|
||||
<li><a class="reference internal" href="#supervisor" id="id7">Supervisor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="nginx-configuration">
|
||||
<h2><a class="toc-backref" href="#contents">Nginx Configuration</a></h2>
|
||||
<p>Although there are many HTTP proxies available, we strongly advise that you
|
||||
@ -173,7 +161,7 @@ exec $GUNICORN -C $ROOT/gunicorn.conf.py --pidfile=$PID $APP
|
||||
<a class="reference external" href="http://github.com/benoitc/gunicorn/blob/master/examples/supervisor.conf">simple configuration</a> is:</p>
|
||||
<pre class="literal-block">
|
||||
[program:gunicorn]
|
||||
command=/usr/local/bin/gunicorn main:application -c /path/to/project/gunicorn.conf.py
|
||||
command=/path/to/gunicorn main:application -c /path/to/gunicorn.conf.py
|
||||
directory=/path/to/project
|
||||
user=nobody
|
||||
autostart=true
|
||||
@ -183,10 +171,23 @@ redirect_stderr=True
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#nginx-configuration" id="id3">Nginx Configuration</a></li>
|
||||
<li><a class="reference internal" href="#using-virtualenv" id="id4">Using Virtualenv</a></li>
|
||||
<li><a class="reference internal" href="#monitoring" id="id5">Monitoring</a><ul>
|
||||
<li><a class="reference internal" href="#runit" id="id6">Runit</a></li>
|
||||
<li><a class="reference internal" href="#supervisor" id="id7">Supervisor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -7,19 +7,19 @@
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
@ -27,20 +27,6 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="contents sidebar topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#server-model" id="id1">Server Model</a><ul>
|
||||
<li><a class="reference internal" href="#master" id="id2">Master</a></li>
|
||||
<li><a class="reference internal" href="#sync-workers" id="id3">Sync Workers</a></li>
|
||||
<li><a class="reference internal" href="#async-workers" id="id4">Async Workers</a></li>
|
||||
<li><a class="reference internal" href="#tornado-workers" id="id5">Tornado Workers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#choosing-a-worker-type" id="id6">Choosing a Worker Type</a></li>
|
||||
<li><a class="reference internal" href="#how-many-workers" id="id7">How Many Workers?</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="server-model">
|
||||
<h2><a class="toc-backref" href="#contents">Server Model</a></h2>
|
||||
<p>Gunicorn is based on the pre-fork worker model. This means that there is a
|
||||
@ -120,10 +106,25 @@ worker processes will start thrashing system resources decreasing the throughput
|
||||
of the entire system.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#server-model" id="id1">Server Model</a><ul>
|
||||
<li><a class="reference internal" href="#master" id="id2">Master</a></li>
|
||||
<li><a class="reference internal" href="#sync-workers" id="id3">Sync Workers</a></li>
|
||||
<li><a class="reference internal" href="#async-workers" id="id4">Async Workers</a></li>
|
||||
<li><a class="reference internal" href="#tornado-workers" id="id5">Tornado Workers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#choosing-a-worker-type" id="id6">Choosing a Worker Type</a></li>
|
||||
<li><a class="reference internal" href="#how-many-workers" id="id7">How Many Workers?</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -7,19 +7,19 @@
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
@ -27,8 +27,98 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="contents topic" id="questions">
|
||||
<p class="topic-title first">Questions</p>
|
||||
<div class="section" id="wsgi-bits">
|
||||
<h2><a class="toc-backref" href="#contents">WSGI Bits</a></h2>
|
||||
<div class="section" id="how-do-i-set-script-name">
|
||||
<h3><a class="toc-backref" href="#contents">How do I set SCRIPT_NAME?</a></h3>
|
||||
<p>By default <tt class="docutils literal">SCRIPT_NAME</tt> is an empy string. The value could be set by
|
||||
setting <tt class="docutils literal">SCRIPT_NAME</tt> in the environment or as an HTTP header.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="server-stuff">
|
||||
<h2><a class="toc-backref" href="#contents">Server Stuff</a></h2>
|
||||
<div class="section" id="how-do-i-reload-my-application-in-gunicorn">
|
||||
<h3><a class="toc-backref" href="#contents">How do I reload my application in Gunicorn?</a></h3>
|
||||
<p>You can gracefully reload by sending HUP signal to gunicorn:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -HUP masterpid
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="how-might-i-test-a-proxy-configuration">
|
||||
<h3><a class="toc-backref" href="#contents">How might I test a proxy configuration?</a></h3>
|
||||
<p>The <a class="reference external" href="http://ha.ckers.org/slowloris/">Slowloris</a> script is a great way to test that your proxy is correctly
|
||||
buffering responses for the synchronous workers.</p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-name-processes">
|
||||
<h3><a class="toc-backref" href="#contents">How can I name processes?</a></h3>
|
||||
<p>If you install the Python package <a class="reference external" href="http://pypi.python.org/pypi/setproctitle">setproctitle</a> Gunicorn will set the process
|
||||
names to something a bit more meaningful. This will affect the output you see
|
||||
in tools like <tt class="docutils literal">ps</tt> and <tt class="docutils literal">top</tt>. This helps for distinguishing the master
|
||||
process as well as between masters when running more than one app on a single
|
||||
machine. See the <a class="reference external" href="/configure.html#proc-name">proc_name</a> setting for more information.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="worker-processes">
|
||||
<h2><a class="toc-backref" href="#contents">Worker Processes</a></h2>
|
||||
<div class="section" id="how-do-i-know-which-type-of-worker-to-use">
|
||||
<h3><a class="toc-backref" href="#contents">How do I know which type of worker to use?</a></h3>
|
||||
<p>Read the <a class="reference external" href="/design.html">design</a> page for help on the various worker types.</p>
|
||||
</div>
|
||||
<div class="section" id="what-types-of-workers-are-there">
|
||||
<h3><a class="toc-backref" href="#contents">What types of workers are there?</a></h3>
|
||||
<p>Check out the configuration docs for <a class="reference external" href="/configure.html#worker-class">worker_class</a></p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-figure-out-the-best-number-of-worker-processes">
|
||||
<h3><a class="toc-backref" href="#contents">How can I figure out the best number of worker processes?</a></h3>
|
||||
<p>Here is our recommendation for tuning the <a class="reference external" href="/design.html#how-many-workers">number of workers</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-change-the-number-of-workers-dynamically">
|
||||
<h3><a class="toc-backref" href="#contents">How can I change the number of workers dynamically?</a></h3>
|
||||
<blockquote>
|
||||
<p>To increase the worker count by one:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -TTIN $masterpid
|
||||
</pre>
|
||||
<p>To decrease the worker count by one:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -TTOU $masterpid
|
||||
</pre>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="kernel-parameters">
|
||||
<h2><a class="toc-backref" href="#contents">Kernel Parameters</a></h2>
|
||||
<p>When dealing with large numbers of concurrent connections there are a handful of
|
||||
kernel parameters that you might need to adjust. Generally these should only
|
||||
affect sites with a very large concurrent load. These parameters are not
|
||||
specific to Gunicorn, they would apply to any sort of network server you may be
|
||||
running.</p>
|
||||
<p>These commands are for Linux. Your particular OS may have slightly different
|
||||
parameters.</p>
|
||||
<div class="section" id="how-can-i-increase-the-maximum-number-of-file-descriptors">
|
||||
<h3><a class="toc-backref" href="#contents">How can I increase the maximum number of file descriptors?</a></h3>
|
||||
<p>One of the first settings that usually needs to be bumped is the maximum number
|
||||
of open file descriptors for a given process. For the confused out there,
|
||||
remember that Unices treat sockets as files.</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo ulimit -n 2048
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-increase-the-maximum-socket-backlog">
|
||||
<h3><a class="toc-backref" href="#contents">How can I increase the maximum socket backlog?</a></h3>
|
||||
<p>Listening sockets have an associated queue of incoming connections that are
|
||||
waiting to be accepted. If you happen to have a stampede of clients that fill up
|
||||
this queue new connections will eventually start getting dropped.</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo sysctl -w net.core.somaxconn="2048"
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#wsgi-bits" id="id1">WSGI Bits</a><ul>
|
||||
<li><a class="reference internal" href="#how-do-i-set-script-name" id="id2">How do I set SCRIPT_NAME?</a></li>
|
||||
@ -54,98 +144,9 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="wsgi-bits">
|
||||
<h2><a class="toc-backref" href="#questions">WSGI Bits</a></h2>
|
||||
<div class="section" id="how-do-i-set-script-name">
|
||||
<h3><a class="toc-backref" href="#questions">How do I set SCRIPT_NAME?</a></h3>
|
||||
<p>By default <tt class="docutils literal">SCRIPT_NAME</tt> is an empy string. The value could be set by
|
||||
setting <tt class="docutils literal">SCRIPT_NAME</tt> in the environment or as an HTTP header.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="server-stuff">
|
||||
<h2><a class="toc-backref" href="#questions">Server Stuff</a></h2>
|
||||
<div class="section" id="how-do-i-reload-my-application-in-gunicorn">
|
||||
<h3><a class="toc-backref" href="#questions">How do I reload my application in Gunicorn?</a></h3>
|
||||
<p>You can gracefully reload by sending HUP signal to gunicorn:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -HUP masterpid
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="how-might-i-test-a-proxy-configuration">
|
||||
<h3><a class="toc-backref" href="#questions">How might I test a proxy configuration?</a></h3>
|
||||
<p>The <a class="reference external" href="http://ha.ckers.org/slowloris/">Slowloris</a> script is a great way to test that your proxy is correctly
|
||||
buffering responses for the synchronous workers.</p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-name-processes">
|
||||
<h3><a class="toc-backref" href="#questions">How can I name processes?</a></h3>
|
||||
<p>If you install the Python package <a class="reference external" href="http://pypi.python.org/pypi/setproctitle">setproctitle</a> Gunicorn will set the process
|
||||
names to something a bit more meaningful. This will affect the output you see
|
||||
in tools like <tt class="docutils literal">ps</tt> and <tt class="docutils literal">top</tt>. This helps for distinguishing the master
|
||||
process as well as between masters when running more than one app on a single
|
||||
machine. See the <a class="reference external" href="/configure.html#proc-name">proc_name</a> setting for more information.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="worker-processes">
|
||||
<h2><a class="toc-backref" href="#questions">Worker Processes</a></h2>
|
||||
<div class="section" id="how-do-i-know-which-type-of-worker-to-use">
|
||||
<h3><a class="toc-backref" href="#questions">How do I know which type of worker to use?</a></h3>
|
||||
<p>Read the <a class="reference external" href="/design.html">design</a> page for help on the various worker types.</p>
|
||||
</div>
|
||||
<div class="section" id="what-types-of-workers-are-there">
|
||||
<h3><a class="toc-backref" href="#questions">What types of workers are there?</a></h3>
|
||||
<p>Check out the configuration docs for <a class="reference external" href="/configure.html#worker-class">worker_class</a></p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-figure-out-the-best-number-of-worker-processes">
|
||||
<h3><a class="toc-backref" href="#questions">How can I figure out the best number of worker processes?</a></h3>
|
||||
<p>Here is our recommendation for tuning the <a class="reference external" href="/design.html#how-many-workers">number of workers</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-change-the-number-of-workers-dynamically">
|
||||
<h3><a class="toc-backref" href="#questions">How can I change the number of workers dynamically?</a></h3>
|
||||
<blockquote>
|
||||
<p>To increase the worker count by one:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -TTIN $masterpid
|
||||
</pre>
|
||||
<p>To decrease the worker count by one:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -TTOU $masterpid
|
||||
</pre>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="kernel-parameters">
|
||||
<h2><a class="toc-backref" href="#questions">Kernel Parameters</a></h2>
|
||||
<p>When dealing with large numbers of concurrent connections there are a handful of
|
||||
kernel parameters that you might need to adjust. Generally these should only
|
||||
affect sites with a very large concurrent load. These parameters are not
|
||||
specific to Gunicorn, they would apply to any sort of network server you may be
|
||||
running.</p>
|
||||
<p>These commands are for Linux. Your particular OS may have slightly different
|
||||
parameters.</p>
|
||||
<div class="section" id="how-can-i-increase-the-maximum-number-of-file-descriptors">
|
||||
<h3><a class="toc-backref" href="#questions">How can I increase the maximum number of file descriptors?</a></h3>
|
||||
<p>One of the first settings that usually needs to be bumped is the maximum number
|
||||
of open file descriptors for a given process. For the confused out there,
|
||||
remember that Unices treat sockets as files.</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo ulimit -n 2048
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-increase-the-maximum-socket-backlog">
|
||||
<h3><a class="toc-backref" href="#questions">How can I increase the maximum socket backlog?</a></h3>
|
||||
<p>Listening sockets have an associated queue of incoming connections that are
|
||||
waiting to be accepted. If you happen to have a stampede of clients that fill up
|
||||
this queue new connections will eventually start getting dropped.</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo sysctl -w net.core.somaxconn="2048"
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
BIN
doc/htdocs/images/gunicorn.png
Normal file
BIN
doc/htdocs/images/gunicorn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
doc/htdocs/images/large_gunicorn.png
Normal file
BIN
doc/htdocs/images/large_gunicorn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@ -4,74 +4,92 @@
|
||||
<meta charset="utf-8" />
|
||||
<title>Green Unicorn - Welcome</title>
|
||||
<link rel="alternate" type="application/rss+xml" href="/feed.xml" />
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="css/index.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="landing">
|
||||
<div id="menu">
|
||||
<ul id="actions">
|
||||
<ul>
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="green-unicorn">
|
||||
<h2>Green Unicorn</h2>
|
||||
<p>Gunicorn 'Green Unicorn' is a <a class="reference external" href="http://www.python.org/dev/peps/pep-0333/">WSGI</a> HTTP Server for UNIX. It's a pre-fork
|
||||
worker model ported from Ruby's <a class="reference external" href="http://unicorn.bogomips.org/">Unicorn</a> project. The Gunicorn server is
|
||||
broadly compatible with various web frameworks, simply implemented, light
|
||||
on server resource usage, and fairly speedy.</p>
|
||||
<p>Feel free to join us in <a class="reference external" href="http://webchat.freenode.net/?channels=gunicorn">#gunicorn</a> on <a class="reference external" href="http://freenode.net">freenode</a>.</p>
|
||||
<p>Gunicorn is released under the MIT License. See the <a class="reference external" href="http://github.com/benoitc/gunicorn/blob/master/LICENSE">LICENSE</a> for more details.</p>
|
||||
</div>
|
||||
<div class="section" id="features">
|
||||
<h2>Features</h2>
|
||||
<ul class="simple">
|
||||
<li>Designed for Unix.</li>
|
||||
<li>Compatible with Python 2.x (>= 2.5)</li>
|
||||
<li>Easy integration with <a class="reference external" href="http://djangoproject.com">Django</a> and <a class="reference external" href="http://pythonpaste.org/">Paster</a> applications
|
||||
(<a class="reference external" href="http://pylonshq.com/">Pylons</a>, <a class="reference external" href="http://turbogears.org/2.0/">TurboGears 2</a>, ...)</li>
|
||||
<li>Process management: <a class="reference external" href="http://gunicorn.org">Gunicorn</a> reaps and restarts workers that die.</li>
|
||||
<li>Load balancing via pre-fork and a shared socket</li>
|
||||
<li>Graceful worker process restarts</li>
|
||||
<li>Upgrade "àla nginx" without losing connections</li>
|
||||
<li>Simple and easy Python configuration</li>
|
||||
<li>Decode chunked transfers on-the-fly, allowing upload progress notifications
|
||||
or stream-based protocols over HTTP</li>
|
||||
<li>Support for <a class="reference external" href="http://eventlet.net">Eventlet</a> and <a class="reference external" href="http://gevent.org">Gevent</a> .</li>
|
||||
<li>Post- and pre-fork hooks</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="applications">
|
||||
<h2>Applications</h2>
|
||||
<ul class="simple">
|
||||
<li>Any <a class="reference external" href="http://www.python.org/dev/peps/pep-0333/">WSGI</a>, <a class="reference external" href="http://djangoproject.com">Django</a> and <a class="reference external" href="http://pythonpaste.org/">Paster</a> compatible applications
|
||||
(<a class="reference external" href="http://pylonshq.com/">Pylons</a>, <a class="reference external" href="http://turbogears.org/2.0/">TurboGears 2</a>, ...)</li>
|
||||
<li>Websockets (see the <a class="reference external" href="http://github.com/benoitc/gunicorn/blob/master/examples/websocket.py">example</a> or the <a class="reference external" href="http://vimeo.com/10461162">screencast</a>)</li>
|
||||
<li>Reverse proxy implementation (with <a class="reference external" href="http://benoitc.github.com/restkit/wsgi_proxy.html">Restkit WSGI proxy</a>)</li>
|
||||
<li>Long Polling</li>
|
||||
<li>Comet</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="header">
|
||||
<img src="images/large_gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</div>
|
||||
<div id="tutorial">
|
||||
<h3>Quick Start</h3>
|
||||
<pre>
|
||||
$ sudo easy_install virtualenv
|
||||
$ mkdir ~/environments/
|
||||
$ virtualenv ~/environments/tutorial/
|
||||
$ cd ~/environments/tutorial/
|
||||
$ ls
|
||||
bin include lib
|
||||
$ source bin/activate
|
||||
(tutorial) $ clear
|
||||
(tutorial) $ ./bin/easy_install gunicorn
|
||||
(tutorial) $ mkdir myapp
|
||||
(tutorial) $ cd myapp/
|
||||
(tutorial) $ vi myapp.py
|
||||
(tutorial) $ cat myapp.py
|
||||
|
||||
def app(environ, start_response):
|
||||
data = "Hello, World!\n"
|
||||
start_response("200 OK", [
|
||||
("Content-Type", "text/plain"),
|
||||
("Content-Length", str(len(data)))
|
||||
])
|
||||
return iter([data])
|
||||
|
||||
(tutorial) $ ../bin/gunicorn -w 4 myapp:app
|
||||
2010-06-05 23:27:07 [16800] [INFO] Arbiter booted
|
||||
2010-06-05 23:27:07 [16800] [INFO] Listening at: http://127.0.0.1:8000
|
||||
2010-06-05 23:27:07 [16801] [INFO] Worker spawned (pid: 16801)
|
||||
2010-06-05 23:27:07 [16802] [INFO] Worker spawned (pid: 16802)
|
||||
2010-06-05 23:27:07 [16803] [INFO] Worker spawned (pid: 16803)
|
||||
2010-06-05 23:27:07 [16804] [INFO] Worker spawned (pid: 16804)
|
||||
</pre>
|
||||
</div>
|
||||
<div class="blurb">
|
||||
<h3>About</h3>
|
||||
<p>
|
||||
Gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX. It's a
|
||||
pre-fork worker model ported from Ruby's Unicorn project. The
|
||||
Gunicorn server is broadly compatible with various web frameworks,
|
||||
simply implemented, light on server resources, and fairly speedy.
|
||||
</p>
|
||||
</div>
|
||||
<div class="blurb">
|
||||
<h3>Features</h3>
|
||||
<ul>
|
||||
<li>Natively supports WSGI, Django, and Paster</li>
|
||||
<li>Automatic worker process management</li>
|
||||
<li>Simple Python configuration</li>
|
||||
<li>Multiple worker configurations</li>
|
||||
<li>Various server hooks for extensibility</li>
|
||||
<li>Compatible with Python 2.x >= 2.5</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="blurb">
|
||||
<h3>Version 0.9.1 - 2010-05-26</h3>
|
||||
<ul>
|
||||
<li>Support https via <tt>X-Forwarded-Protocol</tt> or <tt>X-Forwarded-Ssl</tt> headers</li>
|
||||
<li>Remove <tt>-d</tt> command line to avoid confusion with <tt>-D</tt></li>
|
||||
<li>Fixed a minor configuration bug</li>
|
||||
<li>Fixed umask for Unix sockets</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -7,19 +7,19 @@
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
@ -27,20 +27,6 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="contents sidebar topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#requirements" id="id1">Requirements</a></li>
|
||||
<li><a class="reference internal" href="#with-easy-install" id="id2">With easy_install</a></li>
|
||||
<li><a class="reference internal" href="#from-source" id="id3">From Source</a></li>
|
||||
<li><a class="reference internal" href="#async-workers" id="id4">Async Workers</a></li>
|
||||
<li><a class="reference internal" href="#ubuntu-debian" id="id5">Ubuntu/Debian</a><ul>
|
||||
<li><a class="reference internal" href="#signing-key" id="id6">Signing key</a></li>
|
||||
<li><a class="reference internal" href="#fingerprint" id="id7">Fingerprint</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="requirements">
|
||||
<h2><a class="toc-backref" href="#contents">Requirements</a></h2>
|
||||
<ul class="simple">
|
||||
@ -138,10 +124,25 @@ deb-src http://ppa.launchpad.net/bchesneau/gunicorn/ubuntu karmic main
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#requirements" id="id1">Requirements</a></li>
|
||||
<li><a class="reference internal" href="#with-easy-install" id="id2">With easy_install</a></li>
|
||||
<li><a class="reference internal" href="#from-source" id="id3">From Source</a></li>
|
||||
<li><a class="reference internal" href="#async-workers" id="id4">Async Workers</a></li>
|
||||
<li><a class="reference internal" href="#ubuntu-debian" id="id5">Ubuntu/Debian</a><ul>
|
||||
<li><a class="reference internal" href="#signing-key" id="id6">Signing key</a></li>
|
||||
<li><a class="reference internal" href="#fingerprint" id="id7">Fingerprint</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -7,19 +7,19 @@
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
@ -28,7 +28,7 @@
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="id1">
|
||||
<h2>0.9.1 / 2010-05-26</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.9.1 / 2010-05-26</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Support https via X-Forwarded-Protocol or X-Forwarded-Ssl headers</li>
|
||||
<li>Fix configuration</li>
|
||||
@ -37,7 +37,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id2">
|
||||
<h2>0.9.0 / 2010-05-24</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.9.0 / 2010-05-24</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added <em>when_ready</em> hook. Called just after the server is started</li>
|
||||
<li>Added <em>preload</em> setting. Load application code before the worker processes
|
||||
@ -50,7 +50,7 @@ are forked.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h2>0.8.1 / 2010-04-29</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.8.1 / 2010-04-29</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix builtins import in config</li>
|
||||
<li>Fix installation with pip</li>
|
||||
@ -59,7 +59,7 @@ are forked.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id4">
|
||||
<h2>0.8.0 / 2010-04-22</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.8.0 / 2010-04-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Refactored Worker management for better async support. Now use the -k option
|
||||
to set the type of request processing to use</li>
|
||||
@ -67,7 +67,7 @@ to set the type of request processing to use</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id5">
|
||||
<h2>0.7.2 / 2010-04-15</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.7.2 / 2010-04-15</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added --spew option to help debugging (installs a system trace hook)</li>
|
||||
<li>Some fixes in async arbiters</li>
|
||||
@ -75,13 +75,13 @@ to set the type of request processing to use</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id6">
|
||||
<h2>0.7.1 / 2010-04-01</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.7.1 / 2010-04-01</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix bug when responses have no body.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id7">
|
||||
<h2>0.7.0 / 2010-03-26</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.7.0 / 2010-03-26</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added support for <a class="reference external" href="http://eventlet.net">Eventlet</a> and <a class="reference external" href="http://gevent.org">Gevent</a> based workers.</li>
|
||||
<li>Added <a class="reference external" href="http://dev.w3.org/html5/websockets/">Websockets</a> support</li>
|
||||
@ -91,28 +91,28 @@ to set the type of request processing to use</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id8">
|
||||
<h2>0.6.5 / 2010-03-11</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.6.5 / 2010-03-11</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix pidfile handling</li>
|
||||
<li>Fix Exception Error</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id9">
|
||||
<h2>0.6.4 / 2010-03-08</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.6.4 / 2010-03-08</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Use cStringIO for performance when possible.</li>
|
||||
<li>Fix worker freeze when a remote connection closes unexpectedly.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id10">
|
||||
<h2>0.6.3 / 2010-03-07</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.6.3 / 2010-03-07</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Make HTTP parsing faster.</li>
|
||||
<li>Various bug fixes</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id11">
|
||||
<h2>0.6.2 / 2010-03-01</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.6.2 / 2010-03-01</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added support for chunked response.</li>
|
||||
<li>Added proc_name option to the config file.</li>
|
||||
@ -123,7 +123,7 @@ temporary data.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id12">
|
||||
<h2>0.6.1 / 2010-02-24</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.6.1 / 2010-02-24</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added gunicorn config file support for Django admin command</li>
|
||||
<li>Fix gunicorn config file. -c was broken.</li>
|
||||
@ -131,7 +131,7 @@ temporary data.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id13">
|
||||
<h2>0.6 / 2010-02-22</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.6 / 2010-02-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added setproctitle support</li>
|
||||
<li>Change privilege switch behavior. We now work like NGINX, master keeps the
|
||||
@ -139,14 +139,14 @@ permissions, new uid/gid permissions are only set for workers.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id14">
|
||||
<h2>0.5.1 / 2010-02-22</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.5.1 / 2010-02-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix umask</li>
|
||||
<li>Added Debian packaging</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id15">
|
||||
<h2>0.5 / 2010-02-20</h2>
|
||||
<h2><a class="toc-backref" href="#contents">0.5 / 2010-02-20</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added <a class="reference external" href="configuration.html">configuration file</a> handler.</li>
|
||||
<li>Added support for pre/post fork hooks</li>
|
||||
@ -162,10 +162,31 @@ permissions, new uid/gid permissions are only set for workers.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#id1" id="id16">0.9.1 / 2010-05-26</a></li>
|
||||
<li><a class="reference internal" href="#id2" id="id17">0.9.0 / 2010-05-24</a></li>
|
||||
<li><a class="reference internal" href="#id3" id="id18">0.8.1 / 2010-04-29</a></li>
|
||||
<li><a class="reference internal" href="#id4" id="id19">0.8.0 / 2010-04-22</a></li>
|
||||
<li><a class="reference internal" href="#id5" id="id20">0.7.2 / 2010-04-15</a></li>
|
||||
<li><a class="reference internal" href="#id6" id="id21">0.7.1 / 2010-04-01</a></li>
|
||||
<li><a class="reference internal" href="#id7" id="id22">0.7.0 / 2010-03-26</a></li>
|
||||
<li><a class="reference internal" href="#id8" id="id23">0.6.5 / 2010-03-11</a></li>
|
||||
<li><a class="reference internal" href="#id9" id="id24">0.6.4 / 2010-03-08</a></li>
|
||||
<li><a class="reference internal" href="#id10" id="id25">0.6.3 / 2010-03-07</a></li>
|
||||
<li><a class="reference internal" href="#id11" id="id26">0.6.2 / 2010-03-01</a></li>
|
||||
<li><a class="reference internal" href="#id12" id="id27">0.6.1 / 2010-02-24</a></li>
|
||||
<li><a class="reference internal" href="#id13" id="id28">0.6 / 2010-02-22</a></li>
|
||||
<li><a class="reference internal" href="#id14" id="id29">0.5.1 / 2010-02-22</a></li>
|
||||
<li><a class="reference internal" href="#id15" id="id30">0.5 / 2010-02-20</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -7,19 +7,19 @@
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
@ -27,22 +27,6 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="contents sidebar topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#commands" id="id1">Commands</a><ul>
|
||||
<li><a class="reference internal" href="#gunicorn" id="id2">gunicorn</a></li>
|
||||
<li><a class="reference internal" href="#gunicorn-django" id="id3">gunicorn_django</a></li>
|
||||
<li><a class="reference internal" href="#gunicorn-paster" id="id4">gunicorn_paster</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#integration" id="id5">Integration</a><ul>
|
||||
<li><a class="reference internal" href="#django-manage-py" id="id6">Django ./manage.py</a></li>
|
||||
<li><a class="reference internal" href="#paster-serve" id="id7">paster serve</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="commands">
|
||||
<h2><a class="toc-backref" href="#contents">Commands</a></h2>
|
||||
<p>After installing Gunicorn you will have access to three command line scripts
|
||||
@ -154,10 +138,27 @@ $ paster serve development.ini workers=2
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#commands" id="id1">Commands</a><ul>
|
||||
<li><a class="reference internal" href="#gunicorn" id="id2">gunicorn</a></li>
|
||||
<li><a class="reference internal" href="#gunicorn-django" id="id3">gunicorn_django</a></li>
|
||||
<li><a class="reference internal" href="#gunicorn-paster" id="id4">gunicorn_paster</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#integration" id="id5">Integration</a><ul>
|
||||
<li><a class="reference internal" href="#django-manage-py" id="id6">Django ./manage.py</a></li>
|
||||
<li><a class="reference internal" href="#paster-serve" id="id7">paster serve</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,10 +2,13 @@ template: doc.html
|
||||
title: Configure
|
||||
insert_settings: true
|
||||
|
||||
_TOC_TOP_
|
||||
|
||||
.. contents::
|
||||
:class: sidebar
|
||||
:backlinks: top
|
||||
|
||||
_TOC_BOT_
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
template: doc.html
|
||||
title: Deploy
|
||||
|
||||
_TOC_TOP_
|
||||
|
||||
.. contents::
|
||||
:class: sidebar
|
||||
:backlinks: top
|
||||
|
||||
_TOC_BOT_
|
||||
|
||||
Nginx Configuration
|
||||
-------------------
|
||||
|
||||
@ -145,7 +148,7 @@ Another useful tool to monitor and control Gunicorn is Supervisor_. A
|
||||
`simple configuration`_ is::
|
||||
|
||||
[program:gunicorn]
|
||||
command=/usr/local/bin/gunicorn main:application -c /path/to/project/gunicorn.conf.py
|
||||
command=/path/to/gunicorn main:application -c /path/to/gunicorn.conf.py
|
||||
directory=/path/to/project
|
||||
user=nobody
|
||||
autostart=true
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
template: doc.html
|
||||
title: Design
|
||||
|
||||
_TOC_TOP_
|
||||
|
||||
.. contents::
|
||||
:class: sidebar
|
||||
:backlinks: top
|
||||
|
||||
_TOC_BOT_
|
||||
|
||||
Server Model
|
||||
============
|
||||
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
template: doc.html
|
||||
title: FAQ
|
||||
|
||||
.. contents:: Questions
|
||||
_TOC_TOP_
|
||||
|
||||
.. contents::
|
||||
:backlinks: top
|
||||
|
||||
_TOC_BOT_
|
||||
|
||||
|
||||
WSGI Bits
|
||||
=========
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
template: index.html
|
||||
title: Welcome
|
||||
|
||||
Green Unicorn
|
||||
-------------
|
||||
|
||||
Gunicorn 'Green Unicorn' is a WSGI_ HTTP Server for UNIX. It's a pre-fork
|
||||
worker model ported from Ruby's Unicorn_ project. The Gunicorn server is
|
||||
broadly compatible with various web frameworks, simply implemented, light
|
||||
on server resource usage, and fairly speedy.
|
||||
|
||||
Feel free to join us in `#gunicorn`_ on freenode_.
|
||||
|
||||
Gunicorn is released under the MIT License. See the LICENSE_ for more details.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- Designed for Unix.
|
||||
- Compatible with Python 2.x (>= 2.5)
|
||||
- Easy integration with Django_ and Paster_ applications
|
||||
(`Pylons`_, `TurboGears 2`_, ...)
|
||||
- Process management: Gunicorn_ reaps and restarts workers that die.
|
||||
- Load balancing via pre-fork and a shared socket
|
||||
- Graceful worker process restarts
|
||||
- Upgrade "àla nginx" without losing connections
|
||||
- Simple and easy Python configuration
|
||||
- Decode chunked transfers on-the-fly, allowing upload progress notifications
|
||||
or stream-based protocols over HTTP
|
||||
- Support for `Eventlet`_ and `Gevent`_ .
|
||||
- Post- and pre-fork hooks
|
||||
|
||||
Applications
|
||||
------------
|
||||
|
||||
* Any WSGI_, Django_ and Paster_ compatible applications
|
||||
(`Pylons`_, `TurboGears 2`_, ...)
|
||||
* Websockets (see the example_ or the screencast_)
|
||||
* Reverse proxy implementation (with `Restkit WSGI proxy`_)
|
||||
* Long Polling
|
||||
* Comet
|
||||
|
||||
.. _WSGI: http://www.python.org/dev/peps/pep-0333/
|
||||
.. _Unicorn: http://unicorn.bogomips.org/
|
||||
.. _`#gunicorn`: http://webchat.freenode.net/?channels=gunicorn
|
||||
.. _freenode: http://freenode.net
|
||||
.. _LICENSE: http://github.com/benoitc/gunicorn/blob/master/LICENSE
|
||||
.. _Gunicorn: http://gunicorn.org
|
||||
.. _Django: http://djangoproject.com
|
||||
.. _Paster: http://pythonpaste.org/
|
||||
.. _Eventlet: http://eventlet.net
|
||||
.. _Gevent: http://gevent.org
|
||||
.. _Pylons: http://pylonshq.com/
|
||||
.. _Turbogears 2: http://turbogears.org/2.0/
|
||||
.. _example: http://github.com/benoitc/gunicorn/blob/master/examples/websocket.py
|
||||
.. _`Restkit WSGI proxy`: http://benoitc.github.com/restkit/wsgi_proxy.html
|
||||
.. _screencast: http://vimeo.com/10461162
|
||||
@ -1,10 +1,13 @@
|
||||
template: doc.html
|
||||
title: Install
|
||||
|
||||
_TOC_TOP_
|
||||
|
||||
.. contents::
|
||||
:class: sidebar
|
||||
:backlinks: top
|
||||
|
||||
_TOC_BOT_
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
template: doc.html
|
||||
title: News
|
||||
|
||||
_TOC_TOP_
|
||||
|
||||
.. contents::
|
||||
:backlinks: top
|
||||
|
||||
_TOC_BOT_
|
||||
|
||||
0.9.1 / 2010-05-26
|
||||
------------------
|
||||
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
template: doc.html
|
||||
title: Run
|
||||
|
||||
_TOC_TOP_
|
||||
|
||||
.. contents::
|
||||
:class: sidebar
|
||||
:backlinks: top
|
||||
|
||||
_TOC_BOT_
|
||||
|
||||
Commands
|
||||
--------
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ if sys.hexversion < 0x02020000:
|
||||
import fnmatch
|
||||
import glob
|
||||
import gzip
|
||||
import md5
|
||||
import hashlib
|
||||
import os
|
||||
import re
|
||||
import stat
|
||||
@ -388,7 +388,7 @@ class Output:
|
||||
""" Output and count a warning. Suppress duplicate warnings. """
|
||||
if text:
|
||||
text = encoder.NarrowText(text, None)
|
||||
hash = md5.new(text).digest()
|
||||
hash = hashlib.md5(text).hexdigest()
|
||||
if not self._warns_shown.has_key(hash):
|
||||
self._warns_shown[hash] = 1
|
||||
print '[WARNING] ' + text
|
||||
@ -401,7 +401,7 @@ class Output:
|
||||
""" Output and count an error. Suppress duplicate errors. """
|
||||
if text:
|
||||
text = encoder.NarrowText(text, None)
|
||||
hash = md5.new(text).digest()
|
||||
hash = hashlib.md5(text).hexdigest()
|
||||
if not self._errors_shown.has_key(hash):
|
||||
self._errors_shown[hash] = 1
|
||||
print '[ERROR] ' + text
|
||||
@ -604,8 +604,8 @@ class URL(object):
|
||||
if not self.loc:
|
||||
return None
|
||||
if self.loc.endswith('/'):
|
||||
return md5.new(self.loc[:-1]).digest()
|
||||
return md5.new(self.loc).digest()
|
||||
return hashlib.md5(self.loc[:-1]).hexdigest()
|
||||
return hashlib.md5(self.loc).hexdigest()
|
||||
#end def MakeHash
|
||||
|
||||
def Log(self, prefix='URL', level=3):
|
||||
|
||||
19
doc/templates/base.html
vendored
19
doc/templates/base.html
vendored
@ -7,19 +7,19 @@
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<a href="./">
|
||||
<img src="images/logo.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a><li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
@ -28,8 +28,11 @@
|
||||
<div id="content">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<div id="toc">
|
||||
{% block toc %}{% endblock %}
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
2
doc/templates/doc.html
vendored
2
doc/templates/doc.html
vendored
@ -1,4 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
{% if toc %}
|
||||
{% block toc %}{{ toc }}{% endblock %}
|
||||
{% endif %}
|
||||
{% block body %}{{ body }}{% endblock %}
|
||||
25
doc/templates/index.html
vendored
25
doc/templates/index.html
vendored
@ -1,2 +1,23 @@
|
||||
{% extends "base.html" %}
|
||||
{% block body %}{{ body }}{% endblock %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Green Unicorn - {% block title %}Welcome{% endblock %}</title>
|
||||
<link rel="alternate" type="application/rss+xml" href="/feed.xml" />
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="header">
|
||||
<img src="images/large_gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</div>
|
||||
<div id="content">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">Github</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user