Docs
Get Started

Deploy Django

Prepare the repository

Commit a dependency file supported by your project, such as requirements.txt or the dependency metadata already used by the repository.

Ensure the production server command binds to the port supplied by the runtime. A typical command is:

gunicorn <project>.wsgi:application --bind 0.0.0.0:$PORT

Replace <project> with the Django package containing wsgi.py. Use the command and server dependency already supported by your repository.

Configure variables

Add application-specific values in Environment Variables, for example:

DJANGO_SECRET_KEY=<unique-secret>
DJANGO_SETTINGS_MODULE=<project>.settings
DATABASE_URL=<managed-database-url>

Variable names depend on the application. Do not add a variable only because it appears in this example.

Deploy

  1. Connect the repository and select the branch.
  2. Let the agent detect Python, the dependency file, root directory, port, and process command.
  3. Add a PostgreSQL, MySQL, or other required resource.
  4. Review pre-build commands if the project needs migrations or asset collection.
  5. Start deployment and follow Build Logs.

Run migrations through the repository's established release or post-build process. Confirm that schema changes are safe before applying them to production data.