|
Posted by Cloud Burst on 07/15/06 04:30
On Fri, 14 Jul 2006 15:55:40 -0400, JDS <jeffrey@invalid.address> wrote:
>I am trying to figure out how to use Subversion, but this question isn't
>really Subversion-specific. Any version control system will suffer from
>the same problem, IMO.
>
>I've crossposted to those groups I've deemed most relevant WRT web
>development. (Well, relevant to *me*). I don't think this question will
>be completely relevant in a C/C++ or other local devlopment environment.
>Maybe it is...
>
>
>So, in using Subversion, I have imported a webapp directory tree "into"
>Subversion.
>
>I have then "checked out" a copy of the webapp into a development
>directory. (This is a PHP+Apache+MySQL app, btw).
>
>Now, to test, I have a LAMP environment installed *locally* and I access
>the webapp locally (the cheked out copy) using
>http://localhost/path/to/webapp/
>
>
>Now, the question comes down to configuration details and "pushing" the
>thing to the live web server. The local LAMP config and the "live" SAMP
>config (the live server is on Solaris) are quite different from each other
>as far as naming of paths and whatnot on the server.
>
>There *is* a config file in the webapp hiearchy! Changing that file
>easily makes the webapp point all of its various pieces to the correct
>paths and files on the server.
>
>But the config file has to be different on the working copy than on the
>server!
>
>How can a version control system deal with this problem without me having
>to tweak the "live" config file every time I migrate the app from the
>Subversion repository to the live server?
>
>Any general insight at all would be appreciated. I have worked as a web
>developer for quite a while now, but never have used a VCS before. I'm
>sure it is not a new question! But how does one Google on so esoteric a
>concept?
>
>Allright, thanks. later...
How about:
1. Check in the config file with replaceable parameters instead of
whatever values you have to change for local/testing compared with
server/production values.
2. Then use a little ed or perl script to change the replaceable
values as needed each time you test or deploy.
3. The ed or perl script should also be checked in, so everything
is tidy.
HTH.
CB
[Back to original message]
|