R
R
Robotex2011-01-18 02:56:39
CVS
Robotex, 2011-01-18 02:56:39

Installing the SVN Server

Acquired VDS. I want to raise an SVN server (or git) on it. Moreover, there are some features: svn will be used to develop a web project, therefore the root of the repository must be the root of the site and after the commit it must be immediately available in the browser (and it would be nice to separate the release version on port 80 and the development version on 8080). In addition, the same root directory contains the templates folder, with which the designer works. So the designer should have access only to this folder, and programmers should have access to everything, including this one (if this is not possible, then it’s not a problem to move the folder to another place, but still I would like to). And finally, if possible, I would like to commit the database as well (and also have a release and a development version).

I just don’t know how to implement something like this (I never raised version control systems). Can you tell me?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
ksusha, 2011-01-18
@Robotex

>>repository root should be the root of the site and after the commit should be immediately available in the browser
Perhaps I'll turn on the bore mode and bring some clarity. A repository is not just a collection of files and folders. The subversion repository uses a specially organized file system. Usually the files are stored in the database, or they are files of a certain format, so the root of the repository cannot be the root of the site.
As for using the project files for their intended purpose, you first need to export a working copy (svn checkout). This is already a normal tree of folders and files with a hidden .svn subdirectory in each directory of the tree. Each project member who commits to the central repository has such a local copy. But this copy cannot be used in production either, since it contains these same .svn service subdirectories. To get rid of them, a clean working copy is exported with the svn export command. Now this is your project.
Now I'm just developing a web project using svn, I can share how everything works for me.
There is a VDS where the svn server is running. There are two repository branches - trunk and release. On a local computer, a working copy, as it develops, I will commise everything in the trunk. All scripts are tested on localhost. The developer database is shared, located on the same server as svn.

O
Ogra, 2011-01-18
@Ogra

1. Flies separately, cutlets separately
The root of the repository should not be the root of the site. The repository must have its own structure - with branches, etc.
2. Automatic update
A post-commit hook is set, which will update the site after each commit. There is nothing complicated about this, there is documentation on the Internet.
3. Data
Here you will already need to write a couple of scripts - to remove the dump, and to update it. You may also need a script that removes only a partial dump - critical for the application. Perhaps the best solution would be a special software that keeps the database up to date.

X
xSus, 2011-01-18
@xSus

The keyword Continuous Integration is missing here, it is also a continuous assembly. those. you need middleware that will automatically (or at the click of a button) deploy the site on the desired port. Those. in your case, I would recommend setting up two such scripts: the first deploys and restarts the site on the developer port by commit, and the second on the “combat” 80. Examples of such servers can be CruiseControl, Hudson…
i.e. each site will have its own directory and you can configure Apache or iis on them ...
I think further promote the solution of your problem by keywords yourself?

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question