<commit_before># HS standard Capistrano recipes

What's in this? You'll find tasks and informations to manage various stuff with capistrano like :

* Ruby apps
    * RVM (ruby version manager : run proper ruby version for your deployment)
    * Bundler (app packages management)
    * Unicorn (fast & zero-downtime deployments)
    * ModRails (quick & easy)
* PHP apps
    * CakePHP
    * Lithium
    * PHP-FPM
* Assets management
    * LESS precompile
    * SASS precompile
* Other
    * Multistages
    * SSH forwarding
    * Crontab reload

## Ruby

### Unicorn Zero-Downtime deployments

Check the provided sample configuration (config-samples/unicorn.rb)

## PHP

### PHP-fpm reload

You may need to reload php-fpm if you are using APC or other accelerators because of symlinks caching issues.

Your deployment user will need permission to reload php-fpm. You may edit your /etc/sudoers like so for userx:

    userx ALL=(root) NOPASSWD: /usr/sbin/service php5-fpm reload

### CakePHP recipe

To set database configuration and other environment configurations, we use a symlinked shared config file named bootstrap.local.php.

You may add this to the default CakePHP bootstrap file to include the deployment configs :

    if(file_exists(APP . DS . 'config' . DS . 'bootstrap.local.php')) 
    {
    	include(APP . DS . 'config' . DS . 'bootstrap.local.php');
    }<commit_msg>Added reference<commit_after># HS standard Capistrano recipes

What's in this? You'll find tasks and informations to manage various stuff with capistrano like :

* Ruby apps
    * RVM (ruby version manager : run proper ruby version for your deployment)
    * Bundler (app packages management)
    * Unicorn (fast & zero-downtime deployments)
    * ModRails (quick & easy)
* PHP apps
    * CakePHP
    * Lithium
    * PHP-FPM
* Assets management
    * LESS precompile
    * SASS precompile
* Other
    * Multistages
    * SSH forwarding
    * Crontab reload

## Ruby

### Unicorn Zero-Downtime deployments

Check the provided sample configuration (config-samples/unicorn.rb)

@see http://ariejan.net/2011/09/14/lighting-fast-zero-downtime-deployments-with-git-capistrano-nginx-and-unicorn

## PHP

### PHP-fpm reload

You may need to reload php-fpm if you are using APC or other accelerators because of symlinks caching issues.

Your deployment user will need permission to reload php-fpm. You may edit your /etc/sudoers like so for userx:

    userx ALL=(root) NOPASSWD: /usr/sbin/service php5-fpm reload

### CakePHP recipe

To set database configuration and other environment configurations, we use a symlinked shared config file named bootstrap.local.php.

You may add this to the default CakePHP bootstrap file to include the deployment configs :

    if(file_exists(APP . DS . 'config' . DS . 'bootstrap.local.php')) 
    {
    	include(APP . DS . 'config' . DS . 'bootstrap.local.php');
    }
{'fraction_non_alphanumeric': 0.08020833333333334, 'fraction_numerical': 0.003472222222222222, 'mean_word_length': 3.459752321981424, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3760563', 'n_tokens_mistral': 904, 'n_tokens_neox': 833, 'n_words': 325}