I currently have a web project developed with Codeigniter. My production environment works as follows. I have an SVN set up with Assembla and when developing new features I plan to do so on my local machine from a local server (MAMP, XAMP, etc). After every commit to SVN to save my work I make Assembla automatically upload these changes via ftp to my development environment which is a dev. subdomain to my actual website. This is useful for testing everybody’s changes and is just a nice feature to have.
Now my problem is when I export. Since CodeIgniter has certain configurations for the base_url and site_url and database connections (which are going to be different locally on developers’ machines as well as the dev environment and production environment), won’t that override the settings for that particular machine every time I export. For instance when I make a rollout I’m going to have to copy everything from the dev subdomain to the live domain and wouldn’t that disrupt the database configuration since they are both going to be using different databases. This would also happen when exporting locally to the dev environment.
What is the best practices to handle exporting. Is my production environment efficient? Should I be working differently?
Please any help would be greatly appreciated.
In case of SVN and different configs I just use branches for DEV/PROD/ANY-OTHER environment. it’s fast and lazy solution, which work always
For Working Copies case I use some magic-logic, template-file of config, in which propset’ted mutable data as svn-properties.
On export I export WC and post-process template-file, which appear as ready to use config inside export-dir