Forums | Mahara Community
GIT directory structure
13 June 2012, 6:46 AM
I've been testing GIT prior to using that for updating our new live Mahara & Moodle sites. When I clone Moodle it unpacks the contents into the Moode folder - but when I do the same for Mahara it unpacks a Mahara folder, then inside that is an htdocs folder - the contents of which IS the Mahara platform. Why the need for a separate directory - and therefore more complicated path structure?
My original question was going to be "Is there a way to pull down just the contents of htdocs (into a directory I've named Mahara)", but as I started looking for an answer I couldn't help wonder if I missed something about why it was created this way. My guess is that historically Mahara was created as a standalone product to sit in htdocs under Apache - but now it's commonly being used as part of a larger suite of tools perhaps a more logical structure would be to move the files up a level into the root of the Mahara directory. Even as a standalone platform, if you use GIT you still need to move the folder or redefine the path...
I'd welcome any answers to the 'original' question as well as any thoughts on the wider 'why'.
13 June 2012, 8:13 AM
The reason of having a spearate directory is that some other things are kept outside htdocs, such as tests and Makefile used by developers for code verification and submission.
There is no way to pull down just the contents of inner directory using git functionality, but the question here really, why would you need that? If this is about having moodle and mahara physical directories avialable via the web, there are many ways to make that work, e.g. you may use aliases in apache configuration, or create a symlink in web directory pointed to the different location of mahara/htdocs (the similar can be acheved with mount --bind).
10 January 2013, 2:18 PM
Well, the reason I'd like this is to make it simpler to use git to merge updates into my mahara instance (which we've customised a bit).
so the mahara htdocs folder is under windows at /inetpub/wwwroot/mahara
along with various moodle instances and whatnot
I guess I could unpack it elsewhere and alias the htdocs folder, it's just messier (needs to be documented, communicated, change our backup scripts, etc).
Perhaps I can just create the repo elsewhere to track mahara git, then add a remote repo from my web visible instance to track only the htdocs folder?
10 January 2013, 7:10 PM
Of course, that won't work at all.
10 January 2013, 10:14 PM
Gregor - that's exactly the same reason I was looking to do it!
Making it easier for site admin to update via git.