Entrify

Framework

Django

Django projects served by Gunicorn, with static files served by WhiteNoise.

Container port8000

Requirements

requirements.txt in the repo root with django

Entrify runs pip install -r requirements.txt and adds gunicorn (21 or newer) and whitenoise.

manage.py in the repo root

Entrify identifies Django projects by manage.py, and serves your WSGI_APPLICATION from the DJANGO_SETTINGS_MODULE it sets.

Demo app

A minimal app that is ready to push and deploy. Copy the files below into a new repository, commit, and deploy — it should go live without any changes.

Quickstart

pip install django && django-admin startproject myproject . && python manage.py startapp hello
requirements.txt
django>=4.2
myproject/settings.py
# Add to your existing settings.py:

import os

SECRET_KEY = os.environ.get('SECRET_KEY', 'dev-only-secret-change-in-production')

DEBUG = os.environ.get('DEBUG', 'True') == 'True'

# Read allowed hosts from env var — include your Entrify subdomain
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', 'localhost,127.0.0.1').split(',')

INSTALLED_APPS = [
    'django.contrib.staticfiles',
    'hello',
    # ... other apps
]

ROOT_URLCONF = 'myproject.urls'
myproject/urls.py
from django.urls import path
from hello import views

urlpatterns = [
    path('', views.index),
]
hello/views.py
from django.http import HttpResponse

def index(request):
    html = """
    <html>
      <body style="font-family:system-ui;display:flex;justify-content:center;
                   align-items:center;min-height:100vh;margin:0;
                   background:#0f172a;color:#f1f5f9">
        <div style="text-align:center">
          <h1 style="color:#16a34a">Hello from Entrify!</h1>
          <p style="color:#94a3b8">Django app is live.</p>
        </div>
      </body>
    </html>
    """
    return HttpResponse(html)
Run the quickstart command from your project root to scaffold the project, then add the files above.

Build & start commands

Entrify runs these steps inside the container when you click Deploy.

pip install -r requirements.txt && pip install 'gunicorn>=21' whitenoise
python manage.py migrate --noinput
python manage.py collectstatic --noinput
gunicorn myproject.wsgi:application --bind 0.0.0.0:8000 --workers 2 --threads 4 --keep-alive 5

Environment variables

Set these in Project → Env Vars in the dashboard. Never commit secrets.

VariableRequiredDescription
SECRET_KEYYesDjango requires a secret key. Never commit it — add via dashboard.
DEBUGNoSet to False in production.
ALLOWED_HOSTSYesAdd your Entrify subdomain or Django returns 400 on every request.
DATABASE_URLNoUse dj-database-url to read this in settings.py.

Common issues

DisallowedHost — 400 on every request

Add your Entrify subdomain to ALLOWED_HOSTS, or read it from an env var as shown in the demo app.

Static files not loading

Keep django.contrib.staticfiles in INSTALLED_APPS. Entrify runs collectstatic into your STATIC_ROOT (or its own folder if you set none, or one outside the project folder) and serves the result with WhiteNoise. Uploaded media is served only if your urls.py serves it.

Build log says the site runs on runserver

manage.py must name your settings as a string, e.g. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings"), and must not assign os.environ["DJANGO_SETTINGS_MODULE"] directly. The settings module must be importable from the repository root (myproject/settings.py), and manage.py must not change sys.path (for a src/ or apps/ folder). Otherwise Entrify starts the development server instead of Gunicorn.