Search forkrail

Search documentation, comparisons, and CLI commands.

APIs & backends
Production ready

Deploy Django on forkrail

Automatic ASGI_APPLICATION / WSGI_APPLICATION detection from manage.py, build-time collectstatic served by the router, KMS secrets, and same-account RDS access.

Adapter
None (auto-reads manage.py settings module)
Runtime
Python 3.13 arm64 (ASGI or 10-thread WSGI)
Detection
manage.py + Django dependency
Memory
640–1,024 MB
  • ASGI & WSGI
    Native ASGI, or WSGI via a2wsgi (10 threads per worker)
  • collectstatic
    Runs at build when STATIC_ROOT is set; router serves STATIC_URL
  • KMS secrets
    SECRET_KEY and DATABASE_URL encrypted under your AWS KMS key
  • Cron management
    Trigger maintenance endpoints from vercel.json schedules

1. Prepare Django settings

forkrail inspects manage.py to find your settings module and boots ASGI_APPLICATION (or falls back to WSGI_APPLICATION running 10 concurrent threads under a2wsgi). Make sure ALLOWED_HOSTS allows your .forkrail.com preview hostnames and custom domains:

config/settings.py
import os
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
DEBUG = False
ALLOWED_HOSTS = [
'.forkrail.com',
'app.acme.dev',
]
STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR / 'staticfiles'

Whenever STATIC_ROOT is configured, forkrail runs collectstatic during the build and uploads the static files to S3 so the regional router serves STATIC_URL without invoking Python (including staticfiles.json for manifest storage).

2. Store secrets & deploy

Add Django environment variables and deploy
printf 'django-insecure-replace-me' | forkrail env add portal DJANGO_SECRET_KEY --target production
printf 'postgres://user:pass@db.internal:5432/portal' | forkrail env add portal DATABASE_URL --target production
forkrail deploy --prod
Co-locate with your RDS database

Set "regions": ["iad1"] (or whichever AWS region holds your RDS instance) in vercel.json so database queries stay inside one region with millisecond latency.

Ready to deploy your Django project inside your own AWS account?
Quickstart