我尝试在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
有没有人知道它可能是由什么引起的?
答案 0 :(得分:4)
您似乎面临许可问题。确保您完全是本地 .composer / 目录的所有者。
sudo chown -R user:user~ / .composer / 应解决您的问题。
答案 1 :(得分:0)
在我的情况下,我遇到了同样的错误消息。但原因是作曲家无法解决依赖。
运行cap staging deploy -d
并逐步执行每个命令,如@weyandch建议的那样,有助于找到失败的命令。