我的供应商文件夹遇到了问题。
我正在使用Symfony 2.1.x运行最新版本的capifony。
每次我尝试部署它都工作正常,一切都按预期进行。但是,当我尝试查看我的网站时,它找不到特定的实体,当我压缩我的本地计算机的供应商文件夹并提取它,然后一切正常。然而,这是耗时的,因为供应商文件夹的大小约为100mb,我可以使用composer来安装它们。我没有遇到问题,因为它没有意义。在localhost上一切正常,我正在运行我的供应商的最新版本,但在部署之后它突然丢失了。
我希望这有点清楚,有人可以帮助我这个
关心C4D3R
我的deploy.rb
set :application, "****"
set :domain, "***.hostgator.com"
set :deploy_to, "/home/***/public_html/test.***.org/"
set :app_path, "app"
set :web_path, "web"
set :user, "*****"
set :port, "2222"
set :use_sudo, false
set :php_bin, "/opt/php53/bin/php"
set :assets_install, false
default_run_options[:pty] = true
#SYMFONY 2 SPECIFIC
set :shared_files, ["app/config/parameters.yml"]
set :shared_children, [app_path + "/logs", web_path + "/uploads", "vendor"]
set :use_composer, true
set :update_vendors, true
set :cache_warmup, true
set :repository, "git@bitbucket.org/****/***.git"
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`
set :vendors_mode, "install"
set :model_manager, "doctrine"
# Or: `propel`
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Symfony2 migrations will run
set :keep_releases, 3
# IMPORTANT = 0
# INFO = 1
# DEBUG = 2
# TRACE = 3
# MAX_LEVEL = 3
logger.level = Logger::MAX_LEVEL
# Be more verbose by uncommenting the following line
# logger.level = Logger::MAX_LEVEL
#SPEED UP DEPLOY
# Symfony2 2.1
#before 'symfony:composer:update', 'symfony:copy_vendors'
namespace :symfony do
desc "Copy vendors from previous release"
task :copy_vendors, :except => { :no_release => true } do
if Capistrano::CLI.ui.agree("Do you want to copy last release vendor dir then do composer install ?: (y/N)")
capifony_pretty_print "--> Copying vendors from previous release"
run "cp -a #{previous_release}/vendor #{latest_release}/"
capifony_puts_ok
end
end
end
# Fix persmissions on VPS
after "deploy:update_code" do
namespace :symfony do
capifony_pretty_print "--> Fixing permissions"
run "cd #{latest_release} && find . -type f -exec chmod 644 {} \\;"
run "cd #{latest_release} && find . -type d -exec chmod 755 {} \\;"
capifony_puts_ok
end
end
after "deploy", "deploy:cleanup"