Automatically update SVN repository on another server
Posted
by
Mikey C
on Server Fault
See other posts from Server Fault
or by Mikey C
Published on 2012-11-05T14:49:16Z
Indexed on
2012/11/05
17:04 UTC
Read the original article
Hit count: 212
We have 2 Ubuntu web servers, one of which is our staging server (Staging) and the other is our live server (Live). Staging has our Subversion repository, as well as the latest version of our sites on it. Because the SVN server is running on Staging, I've added post-commit hook scripts so that the staging server automatically has the latest code. Easy.
However, I'd like one of the repositories on Live to also stay updated. This is a repository of images, PDFs and suchlike. When a team member commits to this, I'd like it to automatically update on the live servers so it can be used in mailings, content managed pages etc.
I'd add something to the post-commit to SSH across and update, but for security, we can only SSH from one server to another as user 'commandLine', whereas the 'www-data' user runs the post-commit.
I'd rather not run a cron on Live to update every 5 minutes, but I can't see another way of doing it without altering all our user permissions.
Any ideas?
© Server Fault or respective owner