DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

How do I create staging URLs for my webapp (esp. Heroku)

As I have just released aloud-comments, I find it hard to fix it without breaking it.

For now.sh and Netlify, it is easy. It will create a unique staging URL on every commit, with commithash.

For Heroku, there is this way, but it is discouraged?? This tutorial is from Heroku.

heroku create --remote staging
git push staging master
Enter fullscreen mode Exit fullscreen mode

This is probably a recommended way from Heroku, with easy promotion. But I don't get a unique URL in staging...

Now, if I to do it without Heroku at all (like on DigitalOcean or AWS), what is a recommended way to do it?

Probably to get https://staging.your_domain_name.com, that only your IP can access? Or, is Docker a way to fix?

Top comments (2)

Collapse
 
brandinchiu profile image
Brandin Chiu

The simplest way is to just deploy two applications.

If you were using heroku, you'd deploy twice. You would then use one as a staging and one as production. It's ultimately the same process for a normal VM deployment, where you configure your web server manually to point to two different installs of your application.

Collapse
 
pjeziorowski profile image
Patryk Jeziorowski

Hello!

At Qovery, we're building a platform that allows developers to quickly deploy their applications. We have a native built-in concept of environments - for every branch in your Git repository, we automagically create a deployed environment for you (with separate URLs to your apps). Also, we replicate all the data you may have in your databases and we even plan to add traffic mirroring to remove any differences between your staging and prod environments.

So, basically, you get staging URLs and environments without any additional work, it's built-in.

We're still in beta phase and we're happy to see new developers testing our platform, it's free up to 3 applications and we also provide up to 100% discounts for opensource projects.

You can read about differences of Qovery vs Heroku in this article - qovery.com/blog/differences-heroku...