doupeng8419 2012-12-25 21:10
浏览 39

Capifony,奇怪的供应商部署破坏

I am having difficulties with my vendor folder.

I am using Symfony 2.1.x running the latest release of capifony.

Every time i try to deploy it works fine, everything goes as it should. But when i try to view my site it sais that it can't find specific entities, when i zip my local computer's vendor folder and extract it, then everything works fine. However it's time consuming because the vendor folder is about 100mb in size and i could use composer to install them. I don't get the problem because it doesn't make sense. Everything works fine on localhost, i am running latest builds of my vendors but after deploy it suddenly is missing things.

I hope this is a bit clear and that someone can help me with this

Regards C4D3R

my 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"
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值