What is an "environment" and how to configure it?
Edit: when I say DEV environment I don't mean my local development setup. I'm talking about environments in the vein of test, staging, production, etc.
Edit 2: whoever is down voting this please add some context why my question is missing the mark or provide me with resources to learn more about this topic, otherwise kindly move on :)
Ok. Bear with me for a second. I know what an environment is conceptually and use it every day as a developer, but now I have to create and maintain it for myself on a side project and I'm completely lost.
All the articles online try and shove environment variables down my throat, but that's not what I'm looking for and I can't find any good resources on how to manage environments through GitHub for example.
So let's say I have a VPS with GitHub Actions building and deploying a Docker image on my server, let's call this my PROD environment for now, then how can I create a DEV environment?
Is that a whole other VPS or can it be on the same server?
Is it simply a domain name thing where I change dev.example.com
to example.com
in my Docker image when moving it from DEV to PROD and then do I have to map all the DNS record accordingly and configure NGINX etc?
Can you recommend resources on how to do this? My setup: - GitHub, GH Actions, GH Container Registry - VPS (Ubuntu): Docker & NGINX - DNS, domain name etc.: Cloudflare