-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.php
62 lines (49 loc) · 1.38 KB
/
deploy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace Deployer;
require 'recipe/common.php';
require 'recipe/silverstripe.php';
// Hosts
//user and port is defined in .ssh/config
host('tb-silverstripe-01.twistedbytes.eu')
->stage('production')
->set('deploy_path', '/var/www/vhosts/TB01-007/2017.stripecon.eu/site');
// Configuration
set('bin/php', function () {
return locateBinaryPath('php70');
});
set('default_stage', 'production');
set('repository', 'https://github.com/silverstripe-europe-meetup/website-2017.git');
set('git_tty', false); // [Optional] Allocate tty for git on first deployment; won't work on Windows
// Silverstripe shared dirs
set('shared_dirs', [
'assets'
]);
// Silverstripe writable dirs
set('writable_dirs', [
'assets'
]);
set('allow_anonymous_stats', false);
// Tasks
desc('update docroot symlink');
task('deploy:symlink-twistedbytes', function () {
run("cd {{deploy_path}} && {{bin/symlink}} {{release_path}} docroot");
});
desc('Deploy your project');
task('deploy', [
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:writable',
'deploy:vendors',
'silverstripe:buildflush',
'deploy:clear_paths',
'deploy:symlink',
'deploy:symlink-twistedbytes',
'deploy:unlock',
'cleanup',
'success'
]);
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');