Outils pour utilisateurs

Outils du site


tech:notes_php_capifony

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:notes_php_capifony [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:notes_php_capifony [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon Php Déploiement}}
 +
 +# 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`
 +~~~javascript
 +{
 +    "github-oauth": {
 +        "github.com": "fffffffffffffffff"
 +    }
 +}
 +~~~
 +
 +
 +~~~bash
 +chmod 600 ~/.composer/auth.json
 +~~~
 +
 +ou
 +~~~bash
 +composer config -g --unset github-oauth.api.github.com
 +composer config -g github-oauth.github.com __TOKEN__
 +~~~
 +
 +`app/config/deploy.rb`
 +~~~ruby
 +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`
 +~~~ruby
 +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
 +~~~
 +
 +FIXME
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki