我使用Capistrano和Symfony插件(https://github.com/capistrano/symfony)进行部署(我有Symfony 2.7)。但是,我的CSS错了。我认为没有产生资产。
我使用默认的 deploy.rb 并为chmod添加了ACL命令。
# config valid only for current version of Capistrano
lock '3.5.0'
set :application, 'Dometech.fr'
set :repo_url, 'ssh://git@37.187.154.125:9325/var/www/depotsGit/dometech.git/'
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, '/var/www/dev/Dometech'
set :symfony_directory_structure, 2
namespace :deploy do
after "deploy:updated" , "composer:install"
# Clear ACL only before switching version
before "deploy:publishing" , "symfony:fixes_acl"
end
namespace :symfony do
desc "Add ACL on cache directory"
task :fixes_acl do
on roles :web do
execute :setfacl, "-R -m u:www-data:rwX #{fetch(:release_path)}/app/cache #{fetch(:release_path)}/app/logs"
end
end
end
你能帮我资产吗??
答案 0 :(得分:1)
显然,Symfony Capistrano插件removed Assetic support,所以你应该向deploy.rb
添加一个任务来处理它。您可以采取what was removed:
set :assetic_dump_flags, ''
namespace :assetic do
desc "Dump assets with Assetic"
task :dump do
on release_roles(:all) do
symfony_console "assetic:dump", fetch(:assetic_dump_flags)
end
end
end
并确保使用以下内容调用它:
after 'deploy:updated', 'symfony:assetic:dump'