Created
March 16, 2009 13:10
-
-
Save bastos/79867 to your computer and use it in GitHub Desktop.
Little Script to reload a rails app on server for tests...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# On CRON: | |
# 00,15,30,45 * * * * /home/user/project/reload.sh >> /home/user/log/release_web.log 2>&1 | |
echo "Rebuilding" > /home/user/project/current/public/index.html | |
# Update the code | |
svn update /home/user/project/current | |
# Run migrations | |
cd /home/user/project/current | |
rake RAILS_ENV=$RAILS_ENV db:migrate; | |
# Restart memcached. | |
/user/project/memcached-1.2.6/scripts/memcached-init restart | |
# Restart passenger intances | |
touch tmp/restart.txt | |
# Put the rebuild date in the public | |
date > /home/user/project/current/public/rebuild.txt | |
# Remove the message | |
rm /home/user/project/current/public/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment