Welcome Guest, Not a member yet? Register   Sign In
Working with Configuration Files
#6

I downloaded CI4 to check out how it might handle a multi-environment and multi-domain setup.  I haven't used CI since CI2 so felt a bit out of touch, but suspected CI4 would be a winner.  I scoured this forum and the wider web for tips on how to set this up.  Unfortunately, the tips around CI3.x are not particularly helpful if you're relatively new to recent versions of CI... and the tips for CI4 on this particular aspect of configuration are incomplete.  This is not criticism.  I'm a long-standing member of the open-source community, so just sharing my experience, which is fairly typical of major new framework release.  I got there in the end, so I thought I would add a little more insight so that anyone else grappling with this setup might find it a little easier than I did.

Using .env turned out to too fiddly, given differences between our particular dev and live environments (win v unix).  It just wasn't versatile enough.  However, much depends on the nuances of what you're trying to achieve and how much or how little interoperability is required between the various domains/modules.  In our case the interoperability requirements are high.  I found that the combination of Apache directiing all requests to pubic/index.php, the customisation of public/index.php and the introduction of a new Domain class to handle initial routing to dedicated application folders, with fallback to a default application setup - all before loading system/bootstrap.php - proved to be the most efficient and manageable solution. 

Overall impressions of CI4 and this community so far: Wow! Really good! Hats off to you guys.
Reply


Messages In This Thread
Working with Configuration Files - by dave friend - 05-27-2018, 11:59 AM
RE: Working with Configuration Files - by b126 - 03-06-2024, 10:41 AM
RE: Working with Configuration Files - by b126 - 03-07-2024, 03:56 AM
RE: Working with Configuration Files - by Msobomvu - 07-10-2018, 03:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB