2017-04-05 39 views
0

我正在部署一个Symfony应用程序,并且遇到了当前目录上符号链接的问题。Capistrano Symfony当前符号链接不工作

它的作品,当我删除符号链接,我再次部署,这是与符号链接失败的更新!

我已经测试了这些解决方案:

Deploy:symlink on capistrano points the "current" directory to previous release

但它不工作,有我的部署文件:

set :application, 'aci' 
set :repo_url, '[email protected]:myrepo/repo.git' 

set :scm, :git 

set :composer_install_flags, '--no-interaction --optimize-autoloader' 

# Symfony console commands will use this environment for execution 
set :symfony_env, "prod" 

# Set this to 2 for the old directory structure 
set :symfony_directory_structure, 3 
# Set this to 4 if using the older SensioDistributionBundle 
set :sensio_distribution_version, 5 

# symfony-standard edition directories 
set :app_path, "app" 
set :web_path, "web" 
set :var_path, "var" 
set :bin_path, "app" 

# The next 3 settings are lazily evaluated from the above values, so take care 
# when modifying them 
set :app_config_path, "app/config" 
set :log_path, "app/logs" 
set :cache_path, "app/cache" 

set :symfony_console_path, "app/console" 
set :symfony_console_flags, "--no-debug" 

# Remove app_dev.php during deployment, other files in web/ can be specified here 
set :controllers_to_clear, ["app_*.php"] 

# asset management 
set :assets_install_path, "web" 
set :assets_install_flags, '--symlink' 

# Share files/directories between releases 
set :linked_files, [] 
set :linked_dirs, ["app/logs"] 

# Set correct permissions between releases, this is turned off by default 
set :file_permissions_paths, ["app"] 
set :permission_method, false 

# Share files/directories between releases 
set :linked_files, %w{app/config/parameters.yml} 
set :linked_dirs, %w{app/logs web/uploads} 

after 'deploy:starting', 'composer:install_executable' 
after 'deploy:updated', 'symfony:assets:install' 
after 'deploy', 'deploy:symlink:release' 
+0

'它不工作'任何错误文本,日志或任何线索? – goto

回答

0

我已经找到了解决办法

在它WASN没有符号链接问题,但APC问题,所以有两种解决方案:

首先>速度和脏:

/etc/init.d/apache2 restart 

二>长也更加清晰:

  • 安装https://github.com/ornicar/ApcBundle
  • 添加这对您的.rake:

    命名空间:symfony中做 递减“Clear apc cache” task:clear_apc do on role(:app)do symfony_conso乐“APC:明确” 结束 结束 结束

添加这对您的deploy.rb

after "deploy", "symfony:clear_apc" 

所以现在你清楚你的APC缓存后的各部署和你的项目是最新的。

相关问题