On the docs page, it's mentioned that you can just create your app's parameters.yml
file in the shared/app/config/
folder on remote server. Capifony should then symlink this file in as the real parameters.yml
file.
However when I run a deployment, the following is output on my deployment machine (verbose):
--> Updating Composer dependencies
* executing "sh -c 'cd /var/www/app-stage/releases/20140219212733 && SYMFONY_ENV=prod php composer.phar update --no-dev --verbose --prefer-dist --optimize-autoloader --no-progress'"
servers: ["stage-server"]
[stage-server] executing command
** [out :: stage-server] Loading composer repositories with package information
** [out :: stage-server] Updating dependencies
** [out :: stage-server] Nothing to install or update
** [out :: stage-server] Writing lock file
** [out :: stage-server] Generating optimized autoload files
** [out :: stage-server] Creating the "app/config/parameters.yml" file
** [out :: stage-server] Clearing the cache for the prod environment with debug false
** [out :: stage-server] Installing assets using the hard copy option
** [out :: stage-server] Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
** [out :: stage-server] Installing assets for Pucs\KioskBundle into web/bundles/pucskiosk
** [out :: stage-server] Installing assets for FOS\JsRoutingBundle into web/bundles/fosjsrouting
It seems that when composer update is run, it's producing a new parameters.yml file. But Capifony never deletes it and symlinks in a new one.
Why isn't Capifony symlinking in the parameters.yml file? Do I need additional steps other than just creating the file in the shared dir? Maybe explicitly adding the symlink in my deploy.rb
file?
staging.rb
)set :stages, %w(production staging)
set :default_stage, "staging"
set :stage_dir, "app/config/deploy"
require 'capistrano/ext/multistage'
set :application, "kiosk"
set :app_path, "app"
set :repository, "***"
set :scm, :git
set :deploy_via, :remote_cache
set :model_manager, "doctrine"
set :use_sudo, false
set :use_composer, true
set :update_vendors, true
set :copy_vendors, true
set :keep_releases, 3
after "deploy" do
run "cd #{deploy_to}/current && php app/console cache:clear --env=prod"
run "cd #{deploy_to}/current && php app/console assetic:dump --env=prod"
end
# Be more verbose by uncommenting the following line
logger.level = Logger::MAX_LEVEL
You should have read the documentation ;) http://capifony.org/#symfony2_deployment
You're missing the :shared_files
parameters.
set :shared_files, ["app/config/parameters.yml"]