axum-impl-deployment
Installation
SKILL.md
Axum Deployment
Overview
Deploying an Axum service to production has four concerns: a release build, a
small container image, a graceful shutdown that survives orchestrator restarts,
and container hygiene. All deployment patterns in this skill are identical on
Axum 0.7 and 0.8; axum::serve and Serve::with_graceful_shutdown have the
same signature in both versions.
The single most important runtime concern is graceful shutdown. Docker,
Kubernetes, and systemd send SIGTERM on every stop, restart, and rolling
deploy. A plain axum::serve(listener, app).await ignores SIGTERM, so the
process is killed immediately and every in-flight request is dropped. ALWAYS
install a SIGTERM-aware graceful shutdown.