Common Recipe
require 'recipe/common.php';
- Requires
Configuration
user
Name of current user who is running deploy.
If not set will try automatically get git user name,
otherwise output of whoami
command.
The value of this configuration is autogenerated on access.
keep_releases
Number of releases to preserve in releases folder.
10
repository
Repository to deploy.
default_timeout
Default timeout for run()
and runLocally()
functions.
Set to null
to disable timeout.
300
env
Remote environment variables.
set('env', [
'KEY' => 'something',
]);
It is possible to override it per run()
call.
run('echo $KEY', env: ['KEY' => 'over']);
dotenv
Path to .env
file which will be used as environment variables for each command per run()
.
set('dotenv', '{{current_path}}/.env');
false
deploy_path
The deploy path.
For example can be set for a bunch of host once as:
set('deploy_path', '~/{{alias}}');
Throws exception if not set.
current_path
Return current release path. Default to deploy_path/current
.
set('current_path', '/var/public_html');
'{{deploy_path}}/current'
bin/php
Path to the php
bin.
if (currentHost()->hasOwn('php_version')) {
return '/usr/bin/php{{php_version}}';
}
return which('php');
bin/git
Path to the git
bin.
return which('git');
use_relative_symlink
Should bin/symlink use --relative
option or not. Will detect
automatically.
return commandSupportsOption('ln', '--relative');
bin/symlink
Path to the ln
bin. With predefined options -nfs
.
return get('use_relative_symlink') ? 'ln -nfs --relative' : 'ln -nfs';
sudo_askpass
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.
The value of this configuration is autogenerated on access.
Tasks
deploy:prepare
Prepares a new release.
This task is group task which contains next tasks:
- deploy:info
- deploy:setup
- deploy:lock
- deploy:release
- deploy:update_code
- deploy:env
- deploy:shared
- deploy:writable
deploy:publish
Publishes the release.
This task is group task which contains next tasks:
deploy
Deploys your project.
This task is group task which contains next tasks:
deploy:success
Deploys your project.
Prints success message
deploy:failed
Hook on deploy failure.
logs:app
Shows application logs.
Follows latest application logs.