Developer654079525's avatar

Staging

Currently, we have several VMs in which we are developing apps. Haven't had the need for a staging segment yet. If a small shop is developing an app, do they really need a staging segment on their or client's website? If so, would it then become staging.example.com or example.com/staging? I am not sure on the mechanics so would kindly ask for some guidelines.

For example, how and if to hide this from search engines and similar.

0 likes
4 replies
Mega_Aleksandar's avatar

Hi,

For dev/staging/prod environments I really suggest you try out Docker containers, as it allows you to mimic all the different server setups. If you have a client that already has a server (controlled hosting or a VPS) you can mimic their setup, even install docker on it and not worry about the environment.

As for the staging part itself, my workflow is to have a subdomain with all of the llms.txt, robots.txt, even hardcoded ips in the .htaccess so that I am sure that noone that is not allowed access the staging environment.

Hope it helps a tad bit.

DigitalArtisan's avatar

Be very clear about the distinction between the client and the end users. Users will sometimes assume that a staging, test, or demo environment is the production system. This confusion can lead to misunderstandings and unnecessary issues.

JussiMannisto's avatar

I've never heard the term staging segment. What you need is a staging environment.

Staging is its own environment, similar to development and production. It runs its own instance of the app with its own database, storage, and everything.

The purpose of staging is to manually test changes in an environment that very closely matches production before you deploy them to production. You don't usually run automated tests in staging, as those are for development and CI environments. However, it should have everything you have in production, such as third-party API integrations.

In the case of a regular web app, the staging site would have its own domain or domains. You might run it on a separate server, in a Docker container (if you also use it in production), or even on a production server. Do whatever makes sense in your case.

For example, how and if to hide this from search engines and similar.

You can block external access in many ways. The easiest way is to add Basic authentication at the web server level. That way you'll be prompted for a password the first time you access the site. You could also use IP whitelisting, firewalls, VPNs, etc. But I wouldn't overthink it.

quintinmorrow's avatar

Feels like you’re overthinking the “segment” part a bit. Staging is basically just another environment that mirrors production, not some special path inside your main app. Most setups I’ve seen go with a subdomain and lock it down with auth or IP rules. Even for a small team, having that buffer before pushing live saves you from a lot of awkward mistakes later. staging environment setup

Please or to participate in this conversation.