Django hosting
Run Django with Gunicorn, Celery, managed PostgreSQL and Redis. Migrations run during release, static files are served from the edge cache, and Celery workers get their own CPU allocation.
Build and run
- Detected by
- manage.py, or django in requirements.txt
- Build
- pip install -r requirements.txt && python manage.py collectstatic --noinput
- Start
- gunicorn config.wsgi:application --bind 0.0.0.0:$PORT --workers 4
FROM python:3.12-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN python manage.py collectstatic --noinput
EXPOSE 8000
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "4"]Recommendations
- Set the release command to python manage.py migrate so migrations run once per deploy.
- WhiteNoise works well for static files and needs no external CDN.
- Run Celery workers and Celery beat as separate process types.
- Managed PostgreSQL supports PostGIS and pgvector.
Plans
| Plan | Price | vCPU | Memory | NVMe | Databases | Backups |
|---|---|---|---|---|---|---|
| Launch | $149/mo | 8 | 16 GB | 160 GB | 1 | Daily, kept 7 days |
| Grow | $249/mo | 12 | 32 GB | 320 GB | 2 | Daily, kept 14 days |
| Scale | $349/mo | 16 | 48 GB | 500 GB | 3, plus a read replica | Hourly and daily, kept 30 days |
| Custom | On request | As required | Up to a full server | As required | As required | As required |
Questions
Do we need a Dockerfile to deploy Django?
No. 9live detects Django and builds it with a maintained buildpack. If your repository has a Dockerfile, we use it instead.
How are environment variables managed?
Set them per environment in the dashboard or with the CLI. They are encrypted at rest and injected at runtime. Connection strings for managed databases are added automatically.
What happens when a deploy fails?
If the build fails, or the new release fails its health check, the current release keeps serving traffic. You get a notification with the build or health-check logs.
Other frameworks
Talk to an engineer about your setup
Tell us what you run today and where it runs. We reply within one business day with a recommended plan and an estimate for the migration.
