Basically I want to run web sites and web applications on this server. I use some PHP libraries and well as my own home-grown framework. I wish to use subversion version control for my framework and libraries at a minimum and have a mechanism for synchronizing development and production version of sites and applications. There is a fair bit of data that I do not want to synchronize: logs, data files, session files etc. I would also like to be able to develop from home or at work. Currently only I work on these files but in future there will probably be more than myself, so I guess version control becomes more important.
My current directory structure looks like this:
Code: Select all
/web/
log/ # site inspecific logging
sites/ # virtualhosts
someSite/ # example site
code/ # PHP sources including libraries
libraryName/ # a library
someSite/ # application sources
debug/ # xdebug profiles
foo.htvh # sym linked virtualhost configuration
log/ # site specific logging
session/ # session data, usually not used (memcache usually)
upload/ # uploaded files tmp dir
www/ # vh docroot- Put everything under a single subversion repository. This means I've got to execute svn add, svn move etc. commands whenever I'm working with ALL files and be conscientious about keeping the files I do want to synchronize between servers out of version control. But it does mean I can sync everything in a single command and I can revert everything.
- Only Keep libraries in a repository and rsync everything else. I've really no idea how to use rsync or how it would work rsyncing subversion check-outs. I know rsync can be instructed not to sync certain things and it doesn't require me having to remember to use the svn command when I want to move, add or delete stuff not in version control.
- Rsync everything. No version control but possibly the simplest and fastest. This probably isn't acceptable unless someone comes up with a good reason why I should consider it.
EDIT | Actually I'm leaning quite strongly to subversion for everything now because it's better to only have one system and if I am prepared to enter those svn commands for code, which I edit more than anything else, then there shouldn't be a problem doing it for images and all that. Just as long as I can work out a way of keeping server specific stuff err.. server specific.