Monthly Archives: October 2011

Rails application deployment using shell script

I have used following shell script to deploy one of my Ruby on Rails applications: DATES=`date +%Y%m%d%H%I%S`service apache2 stop &&mysqldump -u[user] -p[pass] [yourdbname] > “your backup directory”[yourdbname]_${DATES}.sqlgit pull &&bundle install –path [your bundle path] &&bundle exec rake db:migrate RAILS_ENV=production &&mv [your application’s production log file] [your application’s production log backup path]/production_${DATES}.log &&touch [your application’s production…

Read More