forked from jalogut/magento2-deployer-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.php.sample_2_2
68 lines (58 loc) · 1.7 KB
/
deploy.php.sample_2_2
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
64
65
66
67
68
<?php
namespace Deployer;
require 'vendor/jalogut/magento2-deployer-plus/recipe/magento_2_2.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');
// [Optional] Git repository. Only needed if not using build + artifact strategy
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');
// Build host
localhost('build');
// 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('config:import')->onRoles('master');
// task('database:upgrade')->onRoles('master');
// task('crontab:update')->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');