CodeIgniter Forums
SVN and deployment methods - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: SVN and deployment methods (/thread-6006.html)



SVN and deployment methods - El Forum - 02-11-2008

[eluser]tmcw[/eluser]
So I've been coding away at a fairly large web application in CI (now 1.6) and I'm almost ready to deploy it. My deal is - some configuration details will, of course, change in deployment. I've been able to narrow these down and move the non-database and non-standard ones into a separate config file, but I'd like to figure out how to use Subclipse, CI, etc, together to make deployment better than updating on the deployment server and then feverishly swapping in live config files. Is there an established technique for this? Could I set one file to be ignored in svn and another to be used in production? Should I detect what server it's running on? Also, what's the best system for having an alternate DB config file?

Any help would be much appreciated! Thanks!


SVN and deployment methods - El Forum - 02-11-2008

[eluser]Pascal Kriete[/eluser]
Assuming that your config files don't change a lot, you move them in once and then tell svn to never touch them again. There should be an exclude option.


SVN and deployment methods - El Forum - 02-13-2008

[eluser]Grahack[/eluser]
I like to detect the server:
Code:
$active_group = $_SERVER['HTTP_HOST']=='mysite.local'?"local":"distant";
...
Code:
$config['base_url']    = 'http://mysite.'.($_SERVER['HTTP_HOST']=='mysite.local'?"local/":"com/");
To me it's not related to SVN. I use sitecopy to upload files on the server. There are some interesting posts about using subversion (for example its hooks to checkout the code after a commit in the web directory).