Deployment Checklist¶
Use this checklist before pushing a next.dj project to production.
Django Settings¶
DEBUGisFalse.ALLOWED_HOSTSlists every host the project answers on.SECRET_KEYis unique to the environment and not committed.CSRF_TRUSTED_ORIGINSincludes every public origin.DATABASESuses a production engine and a managed credential store.
Run the standard Django deployment check.
uv run python manage.py check --deploy
Resolve every warning before deploying.
next.dj Settings¶
Tune NEXT_FRAMEWORK using Production Settings (production-oriented commentary and patterns).
Canonical semantics for each key live in Settings.
Static Files¶
Run
uv run python manage.py collectstaticduring the build.Confirm that
STATIC_ROOTis writable and points at the location your web server expects.Test that hashed asset URLs land in HTML.
Configure caching headers on the static origin.
See Static Files in Production for the production specific guidance.
Database¶
Apply every migration before starting the new process.
Run
uv run python manage.py migrate --planto confirm the migration set.Take a snapshot before applying destructive or high-risk schema changes.
Server¶
Pick WSGI or ASGI based on whether the project uses streaming responses, SSE, or websockets.
Configure the worker count based on the expected concurrency.
Set the worker timeout above the slowest expected handler.
See WSGI and ASGI for the server choice.
Monitoring¶
Forward
page_renderedandaction_dispatchedto your metrics pipeline.Forward
form_validation_failedto alerting when failure rate exceeds the baseline.Track
router_reloadedif the project mounts a dynamic router.
System Checks¶
Run the framework system checks as part of CI and as part of the deployment script.
uv run python manage.py check
A clean exit is required for the deployment to proceed.
Smoke Tests¶
Hit at least three URLs after the deploy.
The site index
/.One captured URL such as
/notes/<existing-id>/.One action endpoint through a simulated POST.
The smoke tests confirm that the file router is mounted, the database is reachable, and the dispatcher resolves URLs.
See Also¶
See also
Static Files in Production for static file handling. Production Settings for production settings. Security for the security checklist.