我正在使用 symfony2.1、github 和 capfony(用于部署)
当我开始这个项目时,这些组合效果很好。
但是,由于我将 SonataUserBundle 和 FOSUserbundle 添加到项目中
帽部署
命令返回错误,例如
PHP 致命错误:在第 26 行的 /var/www/html/muty/releases/20130410144941/app/AppKernel.php 中找不到类 'Sonata\AdminBundle\SonataAdminBundle'
但我在这里有 SonataAdminBundle。
[应用程序名称]/vendor/sonata-project/admin-bundle/Sonata/AdminBundle 和 AppKernel.php
public function registerBundles()
{
$bundles = array(
.....
new Sonata\AdminBundle\SonataAdminBundle(),
new Sonata\CacheBundle\SonataCacheBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
new Sonata\jQueryBundle\SonatajQueryBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
new FOS\UserBundle\FOSUserBundle(),
.....
);
}
这些结构在本地运行良好,但无法部署
我使用作曲家而不是供应商。
恕我直言,似乎供应商文件夹未正确部署,我正确吗?或者还有其他地方可以检查吗?请给我一些想法!
多谢
我的 deploy.rb 是
set :application, "myapplication"
set :domain, "myapplication"
set :deploy_to, "/var/www/html/myapplication"
set :app_path, "app"
set :repository, "git@github.com:myname/myapplication.git"
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`
set :default_shell, "TERM=dumb sudo -u app /bin/sh"
set :branch, "master"
set :scm_username, "myname"
set :scm_passphrase, "mypass"
set :use_sudo, false
set :user, 'app'
set :model_manager, "doctrine"
# Or: `propel`
role :web, "49.212.***.***" # Your HTTP server, Apache/etc
role :app, "49.212.***.***" # This may be the same as your `Web` server
role :db, "49.212.***.***", :primary => true # This is where Symfony2 migrations will run
set :keep_releases, 3
set :clear_controllers, false #app_dev.php should be deployed
#set :shared_files, ["app/config/parameters.yml"]
#set :shared_children, [app_path + "/logs", web_path + "/uploads"]
set :use_composer, true
set :update_vendors, true
set :deploy_via, :remote_cache
set :writable_dirs, ["app/cache", "app/logs"]
set :permission_method, :chown #
set :use_set_permissions, false
# Be more verbose by uncommenting the following line
logger.level = Logger::MAX_LEVEL