Emerald Editor Discussion
October 22, 2017, 04:26:25 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Move Website Source to SVN  (Read 14103 times)
0 Members and 1 Guest are viewing this topic.
daemon
Developers
Gem Cutter
***
Posts: 107


WWW
« on: May 20, 2006, 01:55:03 am »

Would it be possible to add the website files into SVN? Create a new directory called web and add all the sources into that. By doing that, commiters can make changes to the website and then deploying them can be easier.
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #1 on: May 20, 2006, 09:48:54 am »

I did look into it before I set up the repository, and how feasible it would be to do this.

In theory it should be possible, but not how it is currently configured. Let me explain.

The server runs Apache as the webserver, and svnserve as the SVN server. If I were to reconfigure Apache with the appropriate SVN hooks, Apache would be able to serve pages instead of svnserve doing it. Then it would be theoretically possible to configure Apache to serve website pages under a specific virtual host.

The main reason I didn't do that is speed. svnserve is way faster than Apache at serving SVN files, especially if you have a lot of them, and I am also aware that other services run on this server, some of which (thinking predominantly of www.thevoicesofmany.com here) are heavy computationally and are a lot of work for Apache/PHP to handle.

I may be able to find a way (through looking at ViewVC's code - if I could understand Python!) to write a script to check out a branch, e.g. web into /home/emerald_user/public_html/

I have to be real careful with doing that, though, since I've managed to set it up so that svn.emeraldeditor.com and www.emeraldeditor.com share the same style information etc (I have actually symlinked the style.css and the entire includes and images branches from svn's directory tree to the main site's)

In case you're curious, emerald_user's directory structure looks like this internally:
Code:
/home/
  emerald_user/
    public_html/
      index.php
      style.css
      images/
    svnclient/
      web/
        index.php
        style.css -> ../../public_html/style.css
        viewvc.cgi
This way I have some chance of securing the ViewVC script if there's a bug, and can share the styles consistently across both subdomains.

Since it is done this way it should be relatively easy to make the changes suggested in the new style, which I'll talk about there.

For now, though, I'll still be committing any changes manually.
Logged

"Cleverly disguised as a responsible adult!"
mytreo
Miner
**
Posts: 35


« Reply #2 on: May 20, 2006, 10:19:02 am »

Couldn't you add a copy of the website source files to SVN and then just copy them back over to the "live" directory manually whenever you want to commit to the latest changes?
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #3 on: May 20, 2006, 10:47:34 am »

In theory, but I'll have to check it out back here before uploading it again. I still feel I can write a script to do it better. (That way it's just a push of a button)
Logged

"Cleverly disguised as a responsible adult!"
mytreo
Miner
**
Posts: 35


« Reply #4 on: May 20, 2006, 10:55:23 am »

Hmmm I guess, but there are many ways to skin a cat... you could perhaps write a bash script (or php or combination of both) to do the checking out and then have it copy the files across for you. That would seem easier to me, and would still just be the push of a button.
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #5 on: May 20, 2006, 11:21:29 am »

I guess it should be as simple as that, shouldn't it? I should just be able to 'svn co' the web branch.

Let me get the new layout sorted and once that's done, tested and proven, I'll check it in, then check it back out again.
Logged

"Cleverly disguised as a responsible adult!"
mytreo
Miner
**
Posts: 35


« Reply #6 on: May 20, 2006, 11:31:37 am »

Well yes, I think it should be as simple as that.

I have never actually used svn, but I imagine the copying step isn't required but you can just tell svn to use the web directory as the destination for the check-out.

This can probably even be done through the web interface and doesn't need any scripting at all?
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #7 on: May 20, 2006, 11:41:41 am »

Well, the interface used, ViewVC, does not support any formal checkout method, it simply goes into the SVN repository and reads the files directly.

It could be done through a web-based interface (e.g. PHP) but it would be easier with a bash script. I can always call the bash script from PHP or something.
Logged

"Cleverly disguised as a responsible adult!"
mytreo
Miner
**
Posts: 35


« Reply #8 on: May 20, 2006, 12:17:26 pm »

Ahh I see. You'd think the web UI would allow checkout, but it looks like the solution is easy enough anyway Smiley
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #9 on: May 27, 2006, 03:04:14 pm »

Having now added in the forums subdomain and integrated the template (well, sort of, at the time of this post), it becomes clear that the level of integration is such that it would be a bit difficult to add it to SVN.

The problem that is raised was demonstrated last week when I rethemed the main site to the new style - and promptly broke the front page of the SVN home, through it no longer parsing as valid XML.

The same problem would only occur on a larger scale, which is why I'm looking more towards CMS-style systems rather than straight website management - there is a forum thread which is pulled back to the www.emeraldeditor.com homepage, and this also quite neatly takes out the need for the New page, which I probably should remove before long since I'm blatantly not going to update it now I have the forum linkage. (Thanks to Zhrakkan for suggesting it)
Logged

"Cleverly disguised as a responsible adult!"
mytreo
Miner
**
Posts: 35


« Reply #10 on: May 27, 2006, 03:22:21 pm »

Yes, using the SMF SSI is a neat way to make a quick and simple CMS and make the site quick and easy to update. It is quite powerful too, I think you'll like it!

On a slightly different sketch - the way SMF is built it is actually way more than just a forum (although no-one really knows this yet) - using some clever themes you can turn it easily into a wiki, a cms, a blog, a documentation project, a downloads area, or virtually any web site system that is generated from user-input. You could have a full site with all those areas using just one install of SMF with different themes for different boards and categories. When you see how it has been written to enable all this you see it really is a very powerful software... I love it!!
Logged
daemon
Developers
Gem Cutter
***
Posts: 107


WWW
« Reply #11 on: May 27, 2006, 04:28:25 pm »

I'd recommend using Drupal for a CMS. I played around a bit with CMSes (specifically thinking about this site) and I think it looks and works the best. I'm not sure how well it integrates with SMF, though.
Logged
mytreo
Miner
**
Posts: 35


« Reply #12 on: May 27, 2006, 04:44:25 pm »

Drupal is very nice, but probably a bit overkill just to display a couple of pages of news and stuff. Not sure either how well it can integrate with SMF, but the SMF API makes it easy enough to integrate with almost anything.
Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #13 on: May 31, 2006, 12:22:50 am »

It's in SVN/website now. I did mess up a bit, actually since I originally managed to commit the website into the SVN root (e.g. ee.com/index.php ended up being SVN/index.php)

This has been rectified, though.

I haven't included the Bugdar, SMF or ViewVC installations, though, since I don't believe these should be in our SVN tree.
Logged

"Cleverly disguised as a responsible adult!"
daemon
Developers
Gem Cutter
***
Posts: 107


WWW
« Reply #14 on: May 31, 2006, 01:56:15 am »

Great Smiley. Just be sure that whenever you branch that you prefix it with website-BRANCH_NAME.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.086 seconds with 19 queries.