Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats the best way to securely publish a site post build?

So, in your experience, whats the best way? Is there a secure way that's also scriptable/triggerable in a build automation tool?

Edit: I should mention this is windows/.net and I'll be deploying to iis6

like image 676
Dane O'Connor Avatar asked Aug 20 '08 15:08

Dane O'Connor


2 Answers

For some projects I use Capistrano to push out to live. It is built on top of ruby and makes deploy script writing super easy and uses ssh.

On other projects I have a tiny deploy app that uses bash to do an svn export to a temporary directory and then rsync it over to the live server. You can make rsync use ssh.

I greatly prefer the Capistrano method, even if your project isn't in ruby/rails.

like image 175
mk. Avatar answered Nov 15 '22 09:11

mk.


@Neall, I'd add a set -e on the second line, because you don't want the live site being replaced if the rsync fails for any reason. set -e causes the script to exit if any of its commands fail.

Edit: The set -e should be the first thing in the script, right after #!/bin/bash.

like image 38
Ted Percival Avatar answered Nov 15 '22 09:11

Ted Percival