Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am aware of a few ways to deploy websites:

  • FTP
  • Export from source control
  • Base the site on a source control checkout

I can see some upsides and downsides of each. Is there any consensus on the most effective way to deploy new sites OR site modifications?

share|improve this question
1  
Very closely related to some other questions, and rather subjective. This might turn into a debate. Actually, if it involves version control at all , it usually does turn into a debate. –  Tim Post Jul 13 '10 at 1:38
1  
My interest isn't about source control so much as comparing different deployment techniques. I think we could expect reasonable comparisons of pros and cons. –  Grant Palin Jul 13 '10 at 1:48
add comment

4 Answers

up vote 6 down vote accepted

What has worked best for us on Stack Overflow (and meets point 2 of the Joel Test) is a continuous integration solution, allowing one-click building of our production sites, as well as automated builds of our developer tier upon new code check-in.

We use the .NET flavor of CruiseControl, with the exciting name.. CruiseControl.NET :)

Some of the key features include:

  • Integration with a variety of Source Control systems
  • Integration with other external tools, such as NAnt and Visual Studio
  • Can build multiple projects on one server
  • Remote management and reporting

We've been extremely happy with this open-source software and would recommend it to any team wishing to streamline their build process.

share|improve this answer
2  
I thought that Caps Lock was cruise control... for cool –  Mark Henderson Jul 13 '10 at 5:26
add comment

I prefer deploys which are automated and repeatable. You'd definitely want to start with a source control tag so you know exactly what you deployed and can re-deploy it anytime. Then use scripts to push that to the server, something along the lines of Capistrano, or just a homemade bash script or something.

For sites that use compiled code, if the testing servers match the production servers it's probably best to compile the code once, and push that same compiled version to production once it's been tested.

share|improve this answer
add comment

I use custom scripts. For static (HTML based) websites I use double directories with new and installed versions, then the script runs a recursive diff on the new and installed versions and uploads only the files which have changed.

share|improve this answer
    
What language is the script? bash? Mind giving us a peek? –  paan Jul 13 '10 at 5:00
    
@paan: It is in Perl. I'm sorry but I can't release the whole script. –  delete Jul 13 '10 at 6:17
add comment

I use git with a couple of customized hooks for deployment. This even has the advantage that I can run several branches for dev/test/beta/production sites and do some CI. For urgent patches, git always allows to cherry-pick specific commits from one branch into the next.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.