Skip to content

Clarify Django deployment commands#1154

Closed
radiantjade wants to merge 1 commit into
railwayapp:mainfrom
radiantjade:django-predeploy-docs
Closed

Clarify Django deployment commands#1154
radiantjade wants to merge 1 commit into
railwayapp:mainfrom
radiantjade:django-predeploy-docs

Conversation

@radiantjade
Copy link
Copy Markdown
Contributor

Summary

  • explain how Railpack applies Django migrations when no custom start command is set
  • add the Build Command needed to run collectstatic for WhiteNoise
  • note that collectstatic should not run as a pre-deploy command because pre-deploy filesystem changes are not persisted

Fixes #1101.
Fixes #1102.

Verification

  • git diff --check
  • pnpm exec content-collections build
  • pnpm tsc
  • pnpm build

The Django guide already configures Postgres and WhiteNoise, but it stopped before explaining how the deployment actually applies database migrations and collects static assets. This adds a small deployment-command section that matches Railpack's Django start command behavior and Railway's pre-deploy filesystem semantics.

Constraint: Railpack currently generates a Django start command that runs manage.py migrate before gunicorn when no custom start command is set

Constraint: Railway pre-deploy commands run in a separate container, so collectstatic output must be produced during build rather than pre-deploy

Rejected: Add a full Django production deployment rewrite | too broad for the two focused documentation gaps

Confidence: high

Scope-risk: narrow

Tested: git diff --check

Tested: pnpm exec content-collections build

Tested: pnpm tsc

Tested: pnpm build
@brody192 brody192 closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Static file collection automation is missing in the Django guide Migration automation is missing in the Django guide

2 participants