Connect a repo or start from a template — we build, deploy, and route it with SSL.
Docs, an API, and a CLI — wired to the same platform your services run on.
How to Deploy a Django App on ComputeSphere
A Django project reaches a live HTTPS URL on ComputeSphere with one command, csph deploy, once it reads its settings from the environment and runs under Gunicorn in a container. This guide walks through those two changes, the deploy, and then environment variables, migrations, a custom domain and autoscaling. You don't run a server, a process manager or a certificate renewal yourself.
Prefer to start from a working app? Clone the ComputeSphere Django example and follow along.
brew install computesphere/cli/csph
# or
npm install -g @computesphere/csph
Then sign in:
csph auth login
Add Gunicorn to requirements.txt, and read your host and secret settings from the environment instead of hardcoding them:
import os
DEBUG = os.environ.get("DEBUG", "False") == "True"
SECRET_KEY = os.environ["SECRET_KEY"]
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "").split(",")
This Dockerfile collects static files at build time and serves the app with Gunicorn. The entrypoint runs migrations once, then starts the server:
FROM python:3.12-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN python manage.py collectstatic --noinput
EXPOSE 8000
CMD ["sh", "-c", "python manage.py migrate --noinput && gunicorn myproject.wsgi:application --bind 0.0.0.0:8000"]
Replace myproject with your project's package name.
From your project directory:
csph deploy
ComputeSphere builds the image, runs it on a spherelet, terminates TLS, and returns a public URL. Set the service port to 8000 — the port Gunicorn binds — and ComputeSphere routes public traffic to it:
https://violet-heron.computesphere.app
Keep SECRET_KEY, database credentials, and host settings out of your image:
csph services variables set DEBUG=False ALLOWED_HOSTS=violet-heron.computesphere.app --service <service-id> --environment <environment-id>
csph services secrets set SECRET_KEY="$SECRET_KEY" DATABASE_URL="$DATABASE_URL" --service <service-id> --environment <environment-id>
csph services list shows the service id and csph environments list the environment id.
Set SECRET_KEY and DATABASE_URL in your shell first, for example from a file or your password manager, so the secret itself never appears in the command or your shell history.
Point DATABASE_URL at the database you already run. Add each custom domain you serve from to ALLOWED_HOSTS.
Open Console → Domains, add your hostname, and create the CNAME it shows pointing to your service URL:
Type Name Value
CNAME app violet-heron.computesphere.app
ComputeSphere issues and auto-renews the SSL certificate. Remember to add the new hostname to ALLOWED_HOSTS.
A spherelet is your unit of compute, and you pay a fixed price per spherelet. Tune Gunicorn workers inside each spherelet, run as many spherelets as you need, and turn on autoscaling with a minimum, a maximum, and a target CPU. There are no per-seat fees, and every plan includes data out each month (10 GB to 1,000 GB, by plan), so scaling up stays predictable. Autoscaling is a Team plan feature; on Hobby and Pro you set the spherelet count yourself.
Your Django project now runs on ComputeSphere under Gunicorn, with HTTPS, its settings in variables and secrets, migrations applied, and your own domain.
Next step: get started and run csph deploy from your project, or book a 15-minute demo.
Fixed price per spherelet, flat plan per team — ship without DevOps or surprise bills.
Start free trial14-day free trial
Predictable per-spherelet pricing, a flat plan per team, and managed primitives built in — no DevOps, no surprise bills.
Browse Some Related Blogs
Connect a repo or start from a template — live URL, SSL, and zero DevOps, on predictable monthly pricing. 14-day free trial.