This repository has been archived by the owner on Feb 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.php
executable file
·81 lines (71 loc) · 2.04 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
namespace Deployer;
require __DIR__ . '/vendor/deployer/deployer/recipe/symfony3.php'; //Comes form deployer.phar
require __DIR__ . '/vendor/w-vision/pimcore-deployer/recipes/pimcore.php';
require __DIR__ . '/vendor/w-vision/pimcore-deployer/recipes/yarn.php';
host('host.host.host')
->user('user')
->port(22)
->set('deploy_path', '/var/www')
->identityFile('.deployer/id_deployer')
->stage('dev')
->set('branch', 'master');
// Project Configuration
set('repository', 'repo');
// Configuration
//set('ssh_type', 'ext-ssh2');
set('default_stage', 'dev');
set('shared_files', [
'app/config/parameters.yml',
'var/config/system.php',
'var/config/debug-mode.php',
'var/config/maintenance.php',
'var/config/reports.php',
'var/config/GeoLite2-City.mmdb',
'var/bundles/LuceneSearchBundle/state.cnf'
]);
set('shared_dirs', [
'web/var',
'var/email',
'var/recyclebin',
'var/versions',
'var/sessions',
'var/bundles/LuceneSearchBundle/index',
'var/bundles/LuceneSearchBundle/site-map'
]);
set('pimcore_shared_configurations', [
'var/config/website-settings.php',
'var/config/reports.php',
'var/config/web2print.php',
'var/config/workflowmanagement.php',
'var/config/importdefinitions.php'
]);
/*set('bin/php', function () {
return '/opt/cpanel/ea-php72/root/usr/bin/php';
});*/
/*set('bin/composer', function() {
return '{{bin/php}} composer.phar';
});*/
desc('Deploy your project');
task('deploy', [
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:writable',
'deploy:vendors',
'deploy:assets:install',
'deploy:yarn:install',
'deploy:yarn:encore:production',
'deploy:clear_paths',
'deploy:pimcore:install-classes',
'deploy:pimcore:migrate:core',
'deploy:pimcore:migrate',
'deploy:symlink',
'deploy:unlock',
'cleanup',
'success'
])->desc('Deploy your project');
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');