Using Capistrano for deployment
So I wanted to get started with capistrano and getting the rails app deployed to the main server (CentOS 4)
I ran into the lighttpd hang issue where the capistrano task to start the lighttpd process on the remote server hangs and doesn't return. The lighttpd process starts up fine though.
The following command solved the issue for me:
nohup sudo /usr/local/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf > /dev/null 2>&1
Another issue was starting backgroundrb processes on the remote servers. Capsitrano would invoke the command 'rake backgroundrb:start' and I could see the output, but doing a ps auxf on the remote server would show no backgroundrb process.
The following shell script works for me :
#!/bin/sh
echo "Starting the backgroundrb server"
echo "cd /var/www/xxx/current; rake backgroundrb:start"
cd /var/www/xxx/current
log="/tmp/backgroundrb.`date +%s`"
echo "Writing to $log"
nohup rake backgroundrb:start > $log 2>&1
cat $log
rm -f $log
Hopefully it will be useful to others.
I ran into the lighttpd hang issue where the capistrano task to start the lighttpd process on the remote server hangs and doesn't return. The lighttpd process starts up fine though.
The following command solved the issue for me:
nohup sudo /usr/local/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf > /dev/null 2>&1
Another issue was starting backgroundrb processes on the remote servers. Capsitrano would invoke the command 'rake backgroundrb:start' and I could see the output, but doing a ps auxf on the remote server would show no backgroundrb process.
The following shell script works for me :
#!/bin/sh
echo "Starting the backgroundrb server"
echo "cd /var/www/xxx/current; rake backgroundrb:start"
cd /var/www/xxx/current
log="/tmp/backgroundrb.`date +%s`"
echo "Writing to $log"
nohup rake backgroundrb:start > $log 2>&1
cat $log
rm -f $log
Hopefully it will be useful to others.

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home