Question

On staging and production dropplets ...

I have a set of simple (yet absolu.necessary) questions:

  1. If I want to work on 3 settings local for dev and then 2 on the server, staging and production, does that mean that I need two droplets, one for staging and another for production?

  2. If it works fine in staging, as far as I sort of intuit it, in Django, it is just a matter of changing one link to send it to staging. So, the way to go is then to send it from the local station to the production server? or can it go from the staging server to the production server? That is, how do I go about?

Development server–> staging and if ok devl --> Production or Develp server --> staging --> production?

  1. I plan to be sending stuff as I develop (never did it before sorry), first to GithubActions and from there, I think to pull it from digitalocean? will it only import the changes?, I suppose, it does not overwrite what already exists.

There will be a way to roll things back to a stable version if for whatever the reason it has crashed?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
May 2, 2025

Hey there!

Yes, it’s best to have two separate Droplets as you mentioned: one for staging and one for production. That way, you can test in staging without breaking production.

The usual flow is:

Local → GitHub → Staging → Production

Once everything looks good in staging, you can deploy to production.

If you’re using GitHub Actions, you can set up separate workflows or branches for staging and production. And yep, it only pulls the new changes, not the whole project.

For rollbacks, you can use git tags, also make sure to have backups enabled.

Good luck with your project!

- Bobby

KFSys
Site Moderator
Site Moderator badge
May 2, 2025

Heya,

You don’t need two droplets — you can run both staging and production on the same droplet, using different domains or ports, but it’s often safer and cleaner to separate them on two droplets, especially if production has higher performance or security needs.

The usual flow is: development → staging → production. You deploy from your local or CI (like GitHub Actions) to staging, test it there, and if everything is fine, deploy the same code to production.

When you use GitHub Actions, you can set it up to deploy only the changes (using git pull or similar), not overwriting everything blindly — but you need to configure this carefully.

Yes, you can roll back: usually by tagging stable versions in Git, or using a backup/snapshot of the server or database to restore a known-good state if something breaks.

Would you like me to outline a simple deploy strategy for this?

alexdo
Site Moderator
Site Moderator badge
May 2, 2025

Heya, @strugglingdeveloper

You can use a single droplet with Docker or separate virtual environments to isolate staging and production. This saves cost while still giving separation — each environment runs in its own container, on different ports or subdomains (e.g. staging.domain.com and domain.com).

You can then use GitHub Actions to deploy to both containers selectively, based on branch (e.g. main for production, dev for staging). Add rollback by using Docker image tags or snapshots instead of just Git.

This way, you get isolation, lower cost, and version control — all without managing multiple droplets. Want a minimal Docker setup example for this?

Hope that this helps!

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.