litestar-deployment
Installation
SKILL.md
Litestar Deployment
Production deployment patterns for Litestar ASGI applications across Docker, Railway, Kubernetes/GKE, Cloud Run, and systemd. Covers multi-stage Dockerfiles, distroless images, asset pipelines, worker containers, and health-check integration.
All deployment paths use Granian (via litestar-granian) as the ASGI server, uv for Python package management, and Bun for frontend asset builds.
Build vs. deploy split: this skill is about running Litestar artifacts in production. For producing those artifacts — wheel bundling with embedded Vite assets, PyApp onefile binaries, GitHub Actions CI/release pipelines — see litestar-build.
Code Style Rules
from __future__ import annotationsis allowed in consumer-app modules (Dockerfiles, deploy scripts, settings).- All Python samples use PEP 604 unions (
T | None). - Granian over uvicorn in every CMD/entrypoint. Use
litestar run(which delegates to Granian whenlitestar-granianis installed). - Environment-driven configuration via
@dataclasssettings — never hardcode secrets or connection strings. - Shell scripts follow Google Shell Style Guide (set -euo pipefail, quoted variables).