Ask YC: How do you upload to your web server?
21–30 of 49 posts
Re: Ask YC: How do you upload to your web server?
#22Git 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.
Re: Ask YC: How do you upload to your web server?
#23Re: Ask YC: How do you upload to your web server?
#24On 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?
#25This 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…
Re: Ask YC: How do you upload to your web server?
#26Re: Ask YC: How do you upload to your web server?
#27Re: Ask YC: How do you upload to your web server?
#28Re: Ask YC: How do you upload to your web server?
#29 sync:
rsync -az --progress ./ user@host:public_html/
.PHONY: sync
But for anything significant, I use a VCS, currently svn or git.