Live data from Hacker News

Ask YC: How do you upload to your web server?

news.ycombinator.com

21–30 of 49 posts

Re: Ask YC: How do you upload to your web server?

#22

Git or SVN using Capistrano. If you're deploying code, you really should be using Capistrano. Even if it is not a Rails project. It is a world of difference.

I was in the same boat as you not too long ago. As the others have said, Capistrano really is the way to go. Out of the box, it's meant to work with rails projects, but if you tweak it a bit, it'll work fine with really any language/environment. You can try www.capify.org to get started. Beware though, the majority of documentation floating around is for the 1.x release. By v2, a lot of the configuration specific details were changed though and unfortunately if you are starting now, the 2.x docs are really lacking. There is an effort underway to bring them up to speed, but so far I haven't seen anything. Read the docs from the 1.x release, as enough of it still applies to 2.x.

Re: Ask YC: How do you upload to your web server?

#24
This is what I have set up. A Git repository on the server. I push all my code to the repo via ssh.

On the server there are Dev, Staging, and Production environments. Dev and Staging are bare checkouts from the git repo. I have deploy shell scripts that automate deploying to both (checking out from source control and running database migrations). The process should be that code is deployed to Dev, then Staging and finally to Production.

The Production environment is NOT a checkout from source control. It is an exact mirror of the Staging environment. And the deploy script to production does the following:

- tags source control with the new release number

- creates a tar.gz backup of the production directories

- does a database backup dump

- then uses rsync to copy files from the staging web directories to the production directories.

- lastly runs migration scripts on the prod database

Re: Ask YC: How do you upload to your web server?

#25
post #15

This is one way to do it on Windows. Use WinKey to map win-P to project.bat. project.bat: rsync -Crltvz -e ssh /cygdrive/c/personal/project/ me@mydomain.com:/bigfiles/project then I can just hit win-P to force the rsync. Runs in a couple seconds even with hundreds of files. But my favorite if I don't need version control is to use http://www.sftpdrive.com/ ">sftpdrive to mount the remote server as a local disk. It is…

You could also try Novell's NetDrive. They don't offer it for download from their site, but I believe it's free.

http://www.novell.com/coolsolutions/qna/999.html

Re: Ask YC: How do you upload to your web server?

#27
Man - I'm low class apparently as I'm apparently the only one who uses Filezilla or just a plain FTP client. I support about 30 domains and this route helps me. I do have some internally-written apps that will upload files to a lot of different domains at once.

Re: Ask YC: How do you upload to your web server?

#29
For my personal site, I use rsync, and I keep the command in a makefile so I don't have to remember it (I also use the makefile to generate the static pages from templates). It looks like this:

  sync:
  	rsync -az --progress ./ user@host:public_html/

  .PHONY: sync
But for anything significant, I use a VCS, currently svn or git.
Post reply on HN