Welcome Guest, Not a member yet? Register   Sign In
Subversion and independent releases of subdomains
#1

[eluser]Unknown[/eluser]
Hello all,

I plan to start using CodeIgniter as the PHP framework for my site. Currently each subdomain of my site resides in a self-contained subdirectory of the document root (this structure is enforced by the web hosting service I use). I also have a lib directory in the document root that contains common resources. Every now and then, using Subversion, I make independent release branches and releases of each of these directories.

If my subdomains are sub1.foo.com and sub2.foo.com then CodeIgniter's application directory will probably look like this:

/application
/controllers
/common
/sub1
/sub2
/models
/common
/sub1
/sub2
/views
/common
/sub1
/sub2

My question now is: Can I use CodeIgniter and still make independent releases of the subdomains? My doubt comes from the code being scattered over the application directory. Is there a best practice in this case?


Regards,

August
#2

[eluser]Xeoncross[/eluser]
Code:
/root
/sub1/application
        /controllers
        /models
        /views
/sub2/application
        /controllers
        /models
        /views


You could probably get Matchbox or HMVC to fix this problem - but if you want to work with CORE CI stock then I would just place the ENTIRE CI system in each subdomain so that none of the changes you make to other sub-domains affect the rest of the system.

Setup a SVN or something that contains the "common" parts that you know EVERY domain will need and then just have the domains update to that version with each commit. Then keep separate branches or projects for just the stuff for that particular sub-domain.

Of course you could also get a host that works and just use Apache configs to solve this problem.
#3

[eluser]Unknown[/eluser]
Thanks for your reply. I think I will go with separate installations for now (after all an installation is only a couple of megabytes). I was also informed about the options when reading the section "Managing your Applications" in the CodeIgniter user guide.




Theme © iAndrew 2016 - Forum software by © MyBB