-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.php
40 lines (36 loc) · 1.33 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
<?php
// All Deployer recipes are based on `recipe/common.php`.
require __DIR__.'/deployer/common.php';
// Define a server for deployment.
// Let's name it "prod" and use port 22.
server('vagrant', '192.168.33.10', 22)
->user('vagrant')
->password('vagrant') // You can use identity key, ssh config, or username/password to auth on the server.
->stage('production')
->env('deploy_path', '/var/www/html'); // Define the base path to deploy your project to.
// Specify the repository from which to download your project's code.
// The server needs to have git installed for this to work.
// If you're not using a forward agent, then the server has to be able to clone
// your project from this repository.
set('repository', '[email protected]:tkuijer/ps_deployment.git');
set('shared_dirs', ['web/img']);
set('shared_files', ['web/config/settings.inc.php']);
set('writable_dirs', ['web/img', 'web/cache', 'web/log', 'web/themes/default-bootstrap/cache']);
set('keep_releases', 5);
set('writable_use_sudo', true);
set('chown_user', 'www-data');
set('chown_group', 'www-data');
/**
* Main task
*/
task('deploy', [
'deploy:prepare',
'deploy:release',
'deploy:update_code',
'deploy:writable',
'deploy:shared',
'deploy:chown',
'deploy:symlink',
'cleanup',
])->desc('Deploy your project');
after('deploy', 'success');