• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SVN and deployment methods

#1
[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!

#2
[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.

#3
[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).


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.