# common [Source](/recipe/common.php) * Requires * [provision](/docs/recipe/provision.md) * [check_remote](/docs/recipe/deploy/check_remote.md) * [cleanup](/docs/recipe/deploy/cleanup.md) * [clear_paths](/docs/recipe/deploy/clear_paths.md) * [copy_dirs](/docs/recipe/deploy/copy_dirs.md) * [info](/docs/recipe/deploy/info.md) * [lock](/docs/recipe/deploy/lock.md) * [push](/docs/recipe/deploy/push.md) * [release](/docs/recipe/deploy/release.md) * [rollback](/docs/recipe/deploy/rollback.md) * [setup](/docs/recipe/deploy/setup.md) * [shared](/docs/recipe/deploy/shared.md) * [symlink](/docs/recipe/deploy/symlink.md) * [update_code](/docs/recipe/deploy/update_code.md) * [vendors](/docs/recipe/deploy/vendors.md) * [writable](/docs/recipe/deploy/writable.md) ## Configuration ### user [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L31) Name of current user who is running deploy. If not set will try automatically get git user name, otherwise output of `whoami` command. ### remote_user [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L49) Name of remote user used for SSH connection. Usually overridden per host. Otherwise, output of `whoami` will be used. ### keep_releases [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L54) Number of releases to preserve in releases folder. ```php title="Default value" 10 ``` ### repository [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L57) Repository to deploy. ### default_timeout [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L62) Default timeout for `run()` and `runLocally()` functions. Set to `null` to disable timeout. ```php title="Default value" 300 ``` ### env [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L78) Remote environment variables. ```php set('env', [ 'KEY' => 'something', ]); ``` It is possible to override it per `run()` call. ```php run('echo $KEY', env: ['KEY' => 'over']); ``` ### dotenv [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L87) Path to `.env` file which will be used as environment variables for each command per `run()`. ```php set('dotenv', '{{current_path}}/.env'); ``` ```php title="Default value" false ``` ### deploy_path [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L97) The deploy path. For example can be set for a bunch of host once as: ```php set('deploy_path', '~/{{alias}}'); ``` ### current_path [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L107) Return current release path. Default to [deploy_path](/docs/recipe/common.md#deploy_path)/`current`. ```php set('current_path', '/var/public_html'); ``` ```php title="Default value" '{{deploy_path}}/current' ``` ### bin/php [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L110) Path to the `php` bin. ### bin/git [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L118) Path to the `git` bin. ### use_relative_symlink [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L124) Should [bin/symlink](/docs/recipe/common.md#bin/symlink) use `--relative` option or not. Will detect automatically. ### bin/symlink [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L129) Path to the `ln` bin. With predefined options `-nfs`. ### sudo_askpass [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L136) Path to a file which will store temp script with sudo password. Defaults to `.dep/sudo_pass`. This script is only temporary and will be deleted after sudo command executed. ### target [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L149) The deploy target: a branch, a tag or a revision. ## Tasks ### deploy:prepare [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L168) Prepare a new release. This task is group task which contains next tasks: * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) ### deploy:publish [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L179) Publish the release. This task is group task which contains next tasks: * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) * [deploy:success](/docs/recipe/common.md#deploysuccess) ### deploy:success [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L189) Prints success message ### deploy:failed [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L199) Hook on deploy failure. ### logs:app [Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L208) Show application logs. Follow latest application logs.