init deployer
This commit is contained in:
parent
3528a2b81b
commit
b5d7281d77
2 changed files with 61 additions and 21 deletions
40
deploy.php
Normal file
40
deploy.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
namespace Deployer;
|
||||
|
||||
require 'recipe/symfony.php';
|
||||
|
||||
// Project name
|
||||
set('application', 'plant-exchange');
|
||||
|
||||
// Project repository
|
||||
set('repository', 'ssh://git@git.thisfro.ch:222/thisfro/plant-exchange.git');
|
||||
|
||||
// [Optional] Allocate tty for git clone. Default value is false.
|
||||
set('git_tty', true);
|
||||
|
||||
// Shared files/dirs between deploys
|
||||
add('shared_files', []);
|
||||
add('shared_dirs', []);
|
||||
|
||||
// Writable dirs by web server
|
||||
add('writable_dirs', []);
|
||||
|
||||
|
||||
// Hosts
|
||||
|
||||
host('pflaenz.li')
|
||||
->set('deploy_path', '~/{{application}}');
|
||||
|
||||
// Tasks
|
||||
|
||||
task('build', function () {
|
||||
run('cd {{release_path}} && build');
|
||||
});
|
||||
|
||||
// [Optional] if deploy fails automatically unlock.
|
||||
after('deploy:failed', 'deploy:unlock');
|
||||
|
||||
// Migrate database before symlink new release.
|
||||
|
||||
before('deploy:symlink', 'database:migrate');
|
||||
|
Reference in a new issue