Guides / Django staging environment for client projects, set up with Django Cloud

Django staging environment for client projects, set up with Django Cloud

A staging environment is a second copy of the app where the client approves changes before they reach real users. It stops "can you just change this one thing" from becoming a live incident. You do not need a DevOps team to run one.

What staging is for

A setup that works for most client projects

  1. Two branches: main is production, staging is the next release.
  2. Two apps: one deploys from main, the other from staging. Each has its own database and its own settings.
  3. Two domains: www.client.com and staging.client.com.
  4. Flow: merge to staging, the client approves, merge staging into main.

Rules that prevent accidents

Staging data

Use fixtures or an anonymized copy of production. Do not copy real customer data into an environment with weaker access controls; in the EU that can be a data protection problem, not just bad hygiene.

Cost

Staging can be the smallest server and database size, since it handles a handful of visitors. The savings are worth taking: a staging environment that is too expensive is a staging environment that gets deleted.

Or skip it

On Django Cloud you create a second project that deploys from your staging branch, with its own settings and database. Production deploys from main, and a push to either branch goes live.

pip install djangocloud-cli
djangocloud deploy

Get startedSee pricing

Free plans are available for students, AWS Activate startups, open-source, non-profit and research projects. See how Django Cloud compares with other ways to host Django.

Django is a registered trademark of the Django Software Foundation. Django Cloud is not affiliated with or endorsed by it. Found a mistake in this guide? Tell us and we will fix it.