Welcome Guest, Not a member yet? Register   Sign In
suggestion for a solution to development machine vs production
#1

I have my development environment on my ubuntu laptop and it runs in Docker. I have a staging environment in AWS and have a CICD pipe from Github up to it and it also runs in Docker. On my development environment I use ngrok to point at my laptop so that external users can reach it (for testing). Thus when I am testing I use the address "http://substantiat-survey.ngrok.io" called address a, for users to reach my machine. On the staging environment I will use the address "http://substantiat" called address b, for users to reach my AWS site. 

So I need to tell my code that it should use url b when it is running on my laptop. So I was looking at Config class. But I am not sure how this would work. What I'd like to do is set an environment variable in the laptop's .htaccess with the value laptop=YES", and my code will use address b if it sees this ENV variable. This is a little bit of an issue since i don't know where .htaccess is in my bitnami apache, running on both the laptop and the aws server. But the beauty of this is that the .htaccess on the laptop and the one on the server should never be merged. I thinks!

Am I making a mountain out of a molehill? 
proof that an old dog can learn new tricks
Reply


Messages In This Thread
suggestion for a solution to development machine vs production - by richb201 - 02-01-2021, 01:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB