3

我尝试在 capifony 的帮助下部署我的 symfony2 项目

cap  deploy:setup

没有问题并存储在 /var/www/htdocs/symfony-project 两个文件夹中

.symfony-project 
 .. releases
 .. shared

之后,当我尝试运行时:

cap  deploy:cold

我明白了

--> Updating code base with remote_cache strategy
--> Creating cache directory................................✔
--> Creating symlinks for shared directories................✔
--> Normalizing asset timestamps............................✔
--> Downloading Composer....................................✔
--> Installing Composer dependencies........................✘
*** [deploy:update_code] rolling back
failed: "sh -c 'sh -c '\\''cd /var/www/htdocs/symfony-project/releases/20130311124645 &&      
php composer.phar install --no-scripts --verbose --prefer-dist --optimize-
autoloader'\\'''" on webservername.net

并且没有文件夹

var/www/htdocs/symfony-project/releases/

我的 deploy.rb 如下:

set :user, "user"
set :port, "12345"

set :application, "Application Name"
set :domain,      "webservername.net"
set :deploy_to,   "/var/www/htdocs/symfony-project"
set :app_path,    "app"


set :repository,  "ssh://#{user}@webservername.net:#{port}/var/repos/symfony-project.git"
set :scm,         :git
set :branch,      "master"

set :model_manager, "doctrine"

role :web,        domain                        
role :app,        domain                         
role :db,         domain, :primary => true       

set  :use_sudo,      false
set  :keep_releases,  3

set :deploy_via, :remote_cache

set :use_composer, true

有没有人知道它可能是由什么引起的?

4

2 回答 2

4

看来您面临权限问题。确保您是本地.composer/目录的完全所有者。

sudo chown -R user:user ~/.composer/应该可以解决您的问题。

于 2013-05-03T18:08:16.203 回答
0

就我而言,我遇到了同样的错误消息。但原因是composer 无法解决的依赖关系

cap staging deploy -d正如@weyanch 建议的那样,运行并逐步执行每个命令有助于找到失败的命令。

于 2013-12-02T08:27:18.373 回答