-
Notifications
You must be signed in to change notification settings - Fork 60
/
deploy.php.sample_2_1
63 lines (54 loc) · 1.52 KB
/
deploy.php.sample_2_1
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
63
<?php
namespace Deployer;
require 'vendor/jalogut/magento2-deployer-plus/recipe/magento_2_1.php';
// Use timestamp for release name
set('release_name', function () {
return date('YmdHis');
});
// Magento dir into the project root. Set "." if magento is installed on project root
set('magento_dir', 'magento');
// Git repository
set('repository', '');
// Space separated list of languages for static-content:deploy
set('languages', 'en_US');
// Enable all caches after deployment
set('cache_enabled_caches', 'all');
// OPcache configuration
task('cache:clear:opcache', 'sudo systemctl reload php-fpm');
after('cache:clear', 'cache:clear:opcache');
// Remote Servers
host('dev_master')
->hostname('<hostname>')
->user('<user>')
->set('deploy_path', '~')
->stage('dev')
->roles('master');
host('stage_master')
->hostname('<hostname>')
->user('<user>')
->set('deploy_path', '~')
->stage('stage')
->roles('master');
host('prod_master')
->hostname('<hostname>')
->user('<user>')
->set('deploy_path', '~')
->stage('prod')
->roles('master');
// ---- Multi-server Configuration ----
// Tasks available only for specific roles
// task('database:upgrade')->onRoles('master');
//
//host('prod_slave_1')
// ->hostname('<hostname>')
// ->user('<user>')
// ->set('deploy_path', '~')
// ->stage('prod')
// ->roles('slave');
//
//host('prod_slave_2')
// ->hostname('<hostname>')
// ->user('<user>')
// ->set('deploy_path', '~')
// ->stage('prod')
// ->roles('slave');