symfony - Capifony + Symfony2 Failed to write cache file -
when deploying dev environment external dev server using capistrano following error:
runtimeexception: failed write cache file "/var/www/xyz.co.uk/app/cache/dev/classes.php".
then have log development server , delete app/cache/dev/ directory.
here development.rb file:
server 'x.xx.xx.xxx', :app, :web, :db, :primary => true ssh_options[:port] = 1234 ssh_options[:forward_agent] = true set :deploy_to, "/var/www/xyz.co.uk" set :symfony_env_prod, "dev" set :branch, "develop" # need clear *_dev controllers set :clear_controllers, false
and deploy.rb file:
set :stage_dir, 'app/config/deploy' # needed symfony2 set :stages, %w(production staging development) require 'capistrano/ext/multistage' set :application, "xyz.co.uk" set :user, "root" # server's user deploys set :normalize_asset_timestamps, false set :repository, "git@github.com:xyz/xyz.co.uk.git" set :scm, :git set :keep_releases, 3 set :use_sudo, false set :web_path, "web" 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 :dump_assetic_assets, true set :deploy_via, :remote_cache #logger.level = logger::max_level
i have in deploy.rb
file set permissions on cache directory:
after "deploy:update_code" capifony_pretty_print "--> ensuring cache directory permissions" run "setfacl -r -m u:www-data:rwx -m u:`whoami`:rwx #{latest_release}/#{cache_path}" run "setfacl -dr -m u:www-data:rwx -m u:`whoami`:rwx #{latest_release}/#{cache_path}" capifony_puts_ok end
Comments
Post a Comment