Skip to content

Deploy Django Applications

Prerequisites

  • Django application in a Git repository
  • HCS account with Applications access
  • Domain name (optional)

Deployment Steps

  1. Login to HCS Dashboard

  2. Create New Application

    • Click “Create New Application”
    • Select “Django” as your application type
    • Connect your Git repository
  3. Configure Build Settings

    • Set Build Pack to nixpacks
    • Set Python version if needed
    • Configure database settings
  4. Deploy Your Application

    • Click “Deploy” to start the build process
    • Wait for build and deployment to complete

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Requirements

  1. Set the base directory where your requirements.txt and manage.py files are located.

In the example repository, it is /coolify.

  1. Add gunicorn to the requirements.txt file, official docs.
  2. Add localhost and your domain to ALLOWED_HOSTS in settings.py file, official docs.

Localhost is required for health checks to work properly.