Sync Workers
-The default. One request per worker. Simple, predictable, and perfect for most applications.
- Learn more -diff --git a/docs/content/assets/stylesheets/home.css b/docs/content/assets/stylesheets/home.css new file mode 100644 index 00000000..d6e49854 --- /dev/null +++ b/docs/content/assets/stylesheets/home.css @@ -0,0 +1,435 @@ +/* ============================================ + Gunicorn Landing Page + Inspired by Caddy: minimal, spacious, clean + ============================================ */ + +.home { + --accent: #499848; + --accent-hover: #3d8040; + --text: #333; + --text-muted: #666; + --bg: #fff; + --bg-alt: #f6f8fa; + --border: #e1e4e8; + --code-bg: #0d1117; + --max-width: 900px; + + width: 100%; + max-width: none; + margin: 0; + padding: 0; + font-size: 1.0625rem; + line-height: 1.7; + color: var(--text); +} + +[data-md-color-scheme="slate"] .home { + --text: #e6e6e6; + --text-muted: #999; + --bg: #1a1a1a; + --bg-alt: #242424; + --border: #333; +} + +/* Remove MkDocs constraints */ +.md-main__inner { margin: 0; max-width: none; } +.md-content { max-width: none; } +.md-content__inner { margin: 0; padding: 0; } + +/* ============================================ + Sections - Caddy-style vertical flow + ============================================ */ +.home section { + padding: 5rem 2rem; +} + +.home section:nth-child(even) { + background: var(--bg-alt); +} + +.home .container { + max-width: var(--max-width); + margin: 0 auto; +} + +/* ============================================ + Hero + ============================================ */ +.hero { + text-align: center; + padding: 6rem 2rem 5rem; +} + +.hero .container { + max-width: 700px; +} + +.hero__logo { + width: 350px !important; + max-width: 350px !important; + min-width: 350px; + height: auto; + margin-bottom: 2rem; +} + +.hero h1 { + font-size: 3rem; + font-weight: 700; + line-height: 1.15; + margin: 0 0 1.5rem 0; + letter-spacing: -0.02em; + white-space: nowrap; +} + +.hero__tagline { + font-size: 1.25rem; + color: var(--text-muted); + margin: 0 0 2.5rem 0; + max-width: 550px; + margin-left: auto; + margin-right: auto; +} + +.hero__buttons { + display: flex; + gap: 1rem; + justify-content: center; + flex-wrap: wrap; + margin-bottom: 3rem; +} + +.btn { + display: inline-flex; + align-items: center; + gap: 0.5rem; + padding: 0.875rem 1.75rem; + font-size: 1rem; + font-weight: 500; + text-decoration: none; + border-radius: 6px; + transition: all 0.15s ease; +} + +.btn--primary { + background: var(--accent); + color: #fff; +} + +.btn--primary:hover { + background: var(--accent-hover); +} + +.btn--secondary { + background: transparent; + color: var(--text); + border: 1px solid var(--border); +} + +.btn--secondary:hover { + border-color: var(--accent); + color: var(--accent); +} + +/* Terminal */ +.terminal { + background: var(--code-bg); + border-radius: 8px; + overflow: hidden; + text-align: left; + max-width: 500px; + margin: 0 auto; + box-shadow: 0 8px 30px rgba(0,0,0,0.12); +} + +.terminal__header { + background: #161b22; + padding: 0.75rem 1rem; + display: flex; + gap: 6px; +} + +.terminal__dot { + width: 12px; + height: 12px; + border-radius: 50%; +} + +.terminal__dot--red { background: #ff5f56; } +.terminal__dot--yellow { background: #ffbd2e; } +.terminal__dot--green { background: #27c93f; } + +.terminal__body { + padding: 1.25rem 1.5rem; + font-family: 'SF Mono', Monaco, Consolas, monospace; + font-size: 0.9rem; + line-height: 1.8; + color: #c9d1d9; +} + +.terminal__line { + display: block; +} + +.terminal__prompt { + color: var(--accent); + user-select: none; +} + +.terminal__comment { + color: #6e7681; +} + +/* ============================================ + Why Gunicorn - 3 pillars + ============================================ */ +.why h2 { + text-align: center; + font-size: 2rem; + margin: 0 0 3rem 0; +} + +.pillars { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 2rem; +} + +.pillar h3 { + font-size: 1.125rem; + margin: 0 0 0.5rem 0; +} + +.pillar p { + color: var(--text-muted); + margin: 0; + font-size: 0.9375rem; +} + +/* ============================================ + Frameworks + ============================================ */ +.frameworks h2 { + text-align: center; + font-size: 1.75rem; + margin: 0 0 0.5rem 0; +} + +.frameworks__subtitle { + text-align: center; + color: var(--text-muted); + margin: 0 0 2rem 0; +} + +.frameworks__list { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0.75rem; +} + +.framework-tag { + padding: 0.5rem 1rem; + background: var(--bg); + border: 1px solid var(--border); + border-radius: 100px; + font-size: 0.875rem; + font-weight: 500; + transition: all 0.15s ease; +} + +[data-md-color-scheme="slate"] .framework-tag { + background: var(--bg-alt); +} + +.framework-tag:hover { + border-color: var(--accent); + color: var(--accent); +} + +.framework-tag--new { + background: var(--accent); + color: #fff; + border-color: var(--accent); +} + +/* ============================================ + Workers + ============================================ */ +.workers h2 { + font-size: 1.75rem; + margin: 0 0 2rem 0; +} + +.workers__grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1rem; +} + +.worker { + padding: 1.5rem; + background: var(--bg); + border: 1px solid var(--border); + border-radius: 8px; + text-decoration: none; + color: inherit; + transition: border-color 0.15s ease; +} + +[data-md-color-scheme="slate"] .worker { + background: var(--bg-alt); +} + +.worker:hover { + border-color: var(--accent); +} + +.worker h3 { + font-size: 1rem; + margin: 0 0 0.25rem 0; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.worker p { + color: var(--text-muted); + font-size: 0.875rem; + margin: 0; +} + +.badge { + font-size: 0.625rem; + font-weight: 700; + padding: 0.125rem 0.375rem; + background: var(--accent); + color: #fff; + border-radius: 3px; + text-transform: uppercase; + letter-spacing: 0.05em; +} + +/* ============================================ + Quick Links + ============================================ */ +.quick-links { + text-align: center; +} + +.quick-links h2 { + font-size: 1.75rem; + margin: 0 0 2rem 0; +} + +.quick-links__grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 1rem; + text-align: left; +} + +.quick-link { + padding: 1.25rem; + background: var(--bg); + border: 1px solid var(--border); + border-radius: 8px; + text-decoration: none; + color: inherit; + transition: border-color 0.15s ease; +} + +[data-md-color-scheme="slate"] .quick-link { + background: var(--bg-alt); +} + +.quick-link:hover { + border-color: var(--accent); +} + +.quick-link strong { + display: block; + margin-bottom: 0.25rem; +} + +.quick-link span { + font-size: 0.875rem; + color: var(--text-muted); +} + +/* ============================================ + Footer CTA + ============================================ */ +.home-footer { + text-align: center; +} + +.home-footer h2 { + font-size: 1.75rem; + margin: 0 0 1rem 0; +} + +.home-footer p { + color: var(--text-muted); + margin: 0 0 2rem 0; +} + +.home-footer__links { + display: flex; + justify-content: center; + gap: 2rem; +} + +.home-footer__links a { + color: var(--text-muted); + text-decoration: none; + font-size: 0.9375rem; +} + +.home-footer__links a:hover { + color: var(--accent); +} + +/* ============================================ + Responsive + ============================================ */ +@media (max-width: 768px) { + .home section { + padding: 3.5rem 1.5rem; + } + + .hero h1 { + font-size: 2.25rem; + } + + .pillars { + grid-template-columns: 1fr; + gap: 1.5rem; + } + + .workers__grid { + grid-template-columns: 1fr; + } + + .quick-links__grid { + grid-template-columns: 1fr 1fr; + } +} + +@media (max-width: 480px) { + .hero h1 { + font-size: 1.875rem; + } + + .hero__buttons { + flex-direction: column; + } + + .btn { + width: 100%; + justify-content: center; + } + + .quick-links__grid { + grid-template-columns: 1fr; + } +} diff --git a/docs/content/index.md b/docs/content/index.md index fbd09544..7a9136b5 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -1,117 +1,127 @@ -# Gunicorn +--- +template: home.html +title: Gunicorn - Python WSGI HTTP Server +--- -
Fast, reliable, and battle-tested. Gunicorn runs your Python web applications with the stability and performance you need in production.
-+ Battle-tested. Production-ready. One command to serve your Python apps. +
+ +pip install gunicorn
-gunicorn myapp:app --workers 4
- Trusted by thousands of companies. The pre-fork worker model handles traffic spikes gracefully.
+Minimal dependencies, simple configuration. Efficient from containers to bare metal.
+Works with any WSGI or ASGI framework. Django, Flask, FastAPI—it just runs.
+Trusted by thousands of companies worldwide. The pre-fork worker model handles traffic spikes gracefully.
-Minimal dependencies, simple configuration. Runs efficiently from containers to bare metal servers.
-Works with any WSGI framework. Django, Flask, Pyramid—your app just runs. Now with ASGI support.
+WSGI and ASGI frameworks, no changes needed
+The default. One request per worker. Simple and predictable.
+ + +Thousands of concurrent connections for I/O-bound workloads.
+ + +Multiple threads per worker. Balance concurrency and simplicity.
+ + +Native asyncio for FastAPI, Starlette, and async frameworks.
+ +The default. One request per worker. Simple, predictable, and perfect for most applications.
- Learn more -Gevent or Eventlet for thousands of concurrent connections. Ideal for I/O-bound workloads.
- Learn more -Multiple threads per worker. Balance between concurrency and simplicity.
- Learn more -Native asyncio support for FastAPI, Starlette, and other async frameworks.
- Learn more -