Notes PHP Capifony

Liens :

http://capifony.org/reference/symfony.html

http://www.disko.fr/reflexions/technique/deploiement-capifony/

Si besoin renseigner le fichier auth.json

~/.composer/auth.json

{ "github-oauth": { "github.com": "fffffffffffffffff" } }
chmod 600 ~/.composer/auth.json

ou

composer config -g --unset github-oauth.api.github.com composer config -g github-oauth.github.com __TOKEN__

app/config/deploy.rb

set :stages, %w(preprod prod) set :default_stage, "preprod" set :stage_dir, "app/config" require 'capistrano/ext/multistage' # Be more verbose by uncommenting the following line logger.level = Logger::MAX_LEVEL

app/config/prod.rb

set :application, "Test1" #set :domain, "test.local" set :domain, "plop" set :deploy_to, "/var/www/#{domain}" set :app_path, "app" ssh_options[:port] = "22" #set :deploy_via, :rsync_with_remote_cache set :deploy_via, :capifony_copy_local #set :repository, "#{domain}:/var/repos/#{application}.git" set :repository, "https://nom:P@ssw0rd@github.com/acme/projet" set :scm, :git # Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none` set :model_manager, "doctrine" # Or: `propel` role :web, domain # Your HTTP server, Apache/etc role :app, domain, :primary => true # This may be the same as your `Web` server set :keep_releases, 3 # Be more verbose by uncommenting the following line #logger.level = Logger::MAX_LEVEL # http://capifony.org/reference/symfony.html # http://www.disko.fr/reflexions/technique/deploiement-capifony/ set :shared_files, ["app/config/parameters.yml"] # Les fichiers à conserver entre chaque déploiement set :shared_children, [app_path + "/logs", "vendor"] # Idem, mais pour les dossiers set :use_composer, true set :use_composer_tmp, true set :update_vendors, false #set :update_vendors, true set :writable_dirs, ["app/cache", "app/logs"] # Application des droits nécessaires en écriture sur les dossiers set :webserver_user, "apache" # L’utilisateur de votre serveur web (Apache, nginx, etc.) # Pas d'ACL donc chown set :permission_method, :chown #set :interactive_mode, false after "deploy", "deploy:cleanup" set :use_sudo, false #default_run_options[:pty] = true ssh_options[:forward_agent] = true #set :composer_options, "--no-dev --verbose --prefer-dist --optimize-autoloader --no-progress" #before "deploy:share_childs", "upload_parameters" after "symfony:cache:warmup", "symfony:doctrine:migrations:migrate" set :assets_install, true set :dump_assetic_assets, true