Welcome Guest, Not a member yet? Register   Sign In
establishing a local configuration for each developer, dev server, production...
#5

(12-31-2014, 10:28 AM)mwhitney Wrote: I actually back-ported the CI_ENV check to CI v2.2 in Bonfire so I could use this on my server. I then added the SetEnv call to a .conf file loaded by my servers (with the environment set appropriately to that server).

As an additional step, I added sub-folders in the /application/config/ directory to my project's ignore filter, so individual developers' config files don't get included in the site's repository. If necessary, the config file(s) can always be version-controlled in a separate repository.

Folder locations in the application and system directories should be relative, so it would be unusual for those to change within the project from one person to the next (though you would probably want to manage the paths in the individual development server configurations).

I do like dmyers' steps of checking the CI_ENV value for each box as part of the deploy scripts, but I prefer to keep those SetEnv calls in Apache's conf directory rather than my project's .htaccess file.

I like a couple of things about this approach
* SetEnv i the apache conf, not in the .htaccess file. That way, we can still have .htaccess in our repo without causing problems.
* Exclude each person's local config from the git repo so we can each keep our local settings private.

I'm still wondering about how one might also keep the production configuration secret from the devs.
Reply


Messages In This Thread
RE: establishing a local configuration for each developer, dev server, production... - by sneakyimp - 12-31-2014, 11:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB