-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.php
More file actions
51 lines (41 loc) · 958 Bytes
/
deploy.php
File metadata and controls
51 lines (41 loc) · 958 Bytes
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
<?php
namespace Deployer;
require 'recipe/laravel.php';
task('upload', function () {
upload('.', '{{release_path}}');
});
task('deploy', [
'deploy:prepare',
'deploy:lock',
'deploy:release',
'upload',
'deploy:shared',
'deploy:writable',
'deploy:symlink',
'deploy:unlock',
'cleanup',
'success'
]);
// Configuration
set('ssh_type', 'native');
set('ssh_multiplexing', false);
set('shared_files', []);
add('shared_dirs', [
'challenges'
]);
add('writable_dirs', []);
// run migrations
before('deploy:symlink', 'artisan:migrate');
// manage fpm
task('reload:php-fpm', function () {
run('sudo /usr/sbin/service php7.0-fpm restart');
});
after('deploy', 'reload:php-fpm');
after('rollback', 'reload:php-fpm');
// Servers
host('production')
->hostname('r9-skycontent.uksouth.cloudapp.azure.com')
->user('deploy')
->forwardAgent()
->set('deploy_path', '/var/www/skycontent.rocket9.co.uk')
;