Question

How to use pipelines for development/production environments like Heroku using App Platform ?

I wanted to use pipelines to manage environments for production and staging so the app can be tested with all the changes made before push them to production, just like heroku does. I was wondering how can I achieve this?


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
October 3, 2023

Hi there,

What you could do to achieve this is to create a separate app to act as your staging environment which will be separate from your production app.

Basically, create two separate apps on the App Platform, one for staging and one for production. That way you will ensure that any changes made in the staging environment do not affect the production environment until you’re ready.

Then you can set up a deployment from GitHub and for the staging app, you might want to deploy from a development or staging branch, while the production app deploys from the main branch.

Next, you can enable automatic deployments for the staging app, so every time you push changes to your development or staging branch, the staging app gets updated.

For the production app, you can choose to manually deploy when you’re confident about the changes. Alternatively, you can also set it to auto-deploy from the main branch if you prefer.

Once you’ve tested your changes in the staging environment and are satisfied, merge your changes from the development or staging branch into the main branch.

This process will mimic the pipeline structure you mentioned with Heroku. The key is maintaining separate environments for staging and production, ensuring you test all changes in a safe environment before deploying them to production.

I would also suggest having separate databases for the two environments so that the staging deployments would not affect your production environment.

Hope that this helps!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

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

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel