-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.php
52 lines (40 loc) · 1.09 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
<?php
namespace Deployer;
require 'recipe/zend_framework.php';
// Project name
set('application', 'upload-geojson');
// Project repository
set('repository', 'https://github.com/geo6/upload-geojson.git');
set('branch', 'master');
// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true);
// Shared files/dirs between deploys
add('shared_files', [
'config/autoload/local.php',
]);
add('shared_dirs', []);
// Writable dirs by web server
add('writable_dirs', [
'data/cache',
'data/temp',
'data/upload',
]);
set('writable_mode', 'chown');
set('writable_use_sudo', true);
set('allow_anonymous_stats', false);
set('cleanup_use_sudo', true);
// Files/dirs to be deleted
set('clear_paths', [
'node_modules',
'resources',
'deploy.php',
'Procfile',
]);
after('deploy:update_code', 'deploy:clear_paths');
// Hosts
inventory('hosts.yml');
// Tasks
task('debug:enable', 'composer run development-enable');
task('debug:disable', 'composer run development-disable');
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');