开发者

Subversion for web designer: repository on a network share and ftp to the live server?

My configuration:

  • htdocs on a windows network share (z:)
  • web developers check out with dreamweaver modify and check in back to the drive z
  • LAMP running on a Ubuntu server virtualized on Hyper-V with apache that point on the z drive for dev in order to test the websites
  • Upload by FTP on the live server

Now:

I need multiple acce开发者_C百科ss to the repository, keep them on a network shares and we manage about 200 websites. All the web developers, administrators and IT need to access to the share.

I found out that creating a svn server is the best way for me, so I created it on a Ubuntu Server which is virtualized on Hyper-V. Right now I have the repos local on the Ubuntu Server but I'd like them on my network drive and I'd like to have a post-commit, if possible, in order to ftp directly on my live server. Do you guys think that a WebDav solution would be better?

Thanks in advance

Angelo


The subversion server is more of a traditional client-server architeture, configure the SVN server to respond to network access, check out the code from the desired remote machine, and build it there.

Older source code control software read from file repositories directly. While subversion does support reading from the repository directly, introducing a network in between what should be a direct file read often creates issues which you would prefer to avoid. Instead of using the direct-file access, use the network access which is written with possible timeouts, repository outages (caused by network outages), and other network-related issues in mind.

If you find that the svnserve technique of accessing SVN is a bit unwieldy (you'll have to assign a port, and possibly open a port on the firewall), it sounds like your environment would do better by tunneling SVN across HTTP or HTTPS. There is an Apache module (named mod_svn) which will translate HTTP GETs and their URLs into SVN requests and move the data back as if it were a simple web page request. The module also allows for some limited browsing of the SVN repository.


I would note, that rather than post commit being set up to FTP files to the server, it might be to your advantage to set up a simple PHP file added to each site which triggers the server to run a subversion update. This avoids the security flaws of FTP. All you would have to do is pull the site from subversion once, make sure the ownership and permissions are correct, make sure this particular php file is allowed to pass shell commands through, then your post-commit hook would be to run the php file instead. Obviously, the post commit hook would have to be configured correctly for each repository, but you would have to do that with your FTP method as well, and it would probably be more complex to set up.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜