开发者

Capistrano and deployment of a website from Github

So, I had what I thought was a fairly simple Capistrano use case: I want to deploy a PHP site from Github. But I'm running into a lot of problems. When I run cap deploy, Capistrano is able to clone the Github repo (the deploy:update_code step), but then in the deploy:finalize_update step it says

executing "rm -rf /var/www/sitename.com/releases/20100611144519/log /var/www/sitename.com/releases/20100611144519/public/system /var/www/sitename.com/releases/20100611144519/tmp/pids &&\\\n      mkdir -p /var/www/sitename.com/releases/20100611144519开发者_如何学运维/public &&\\\n      mkdir -p /var/www/sitename.com/releases/20100611144519/tmp &&\\\n      ln -s /var/www/sitename.com/shared/log /var/www/sitename.com/releases/20100611144519/log &&\\\n      ln -s /var/www/sitename.com/shared/system /var/www/sitename.com/releases/20100611144519/public/system &&\\\n      ln -s /var/www/sitename.com/shared/pids /var/www/sitename.com/releases/20100611144519/tmp/pids"

followed by

executing "find /var/www/sitename.com/releases/20100611144519/public/images /var/www/sitename.com/releases/20100611144519/public/stylesheets /var/www/sitename.com/releases/20100611144519/public/javascripts -exec touch -t 201006111445.23 {} ';'; true"

I don't really understand what's going on here. It then gives an error:

*** [err :: sitename.com] find: `/var/www/sitename.com/releases/20100611144519/public/images': No such file or directory

and another error for each of the stylesheets and javascripts directories.

What's going on? I realize that Capistrano is primarily for deploying Rails and other Ruby apps, but I'm using the capistrano-php gem. I'd appreciate any help.


Capistrano default behavior is to 'touch' all assets files. (To make sure that any cache get the deployment date). Assets are images, stylesheets, etc.

If your PHP application is not using these directories, capistrano complains in such an ugly way.

To disable asset timestamps updates, simply add:

 set :normalize_asset_timestamps, false

to your deploy.rb

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜