Welcome Guest, Not a member yet? Register   Sign In
Best Practice - Shared Application Code > Multiple Front Ends
#1

I am working on a project with the idea that all of the code is the same but only the configuration details are different.
Problem: I only want one copy of CI and the code on the server.
So far I have set up:
/home/repo < the CI & Code
/home/client1/public < client front end #1
/home/client2/publicĀ < client front end #1
etc
Clients #1 and #2 have different URL's, paths and databases
I am looking for guidance as to the best way to swap out the stuff I need. I don't think I can do it in the .env file as that is in the application directory and hence shared.
I can edit index.php and add some constants that get consumed later in the code (eg: Database credentials, $baseURL, etc) but that also seems a bit counter intuative.
Is there a better way of doing this that injecting my constants at the top of index.php? Surely someone else has done it? Since all the clients use excatally the same code it would be redundant to have identical repos set up for each one?
Your help is appreciated. Thanks
Reply


Messages In This Thread
Best Practice - Shared Application Code > Multiple Front Ends - by Webgen - 11-30-2021, 11:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB