This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdeploy.sample.php
executable file
·90 lines (81 loc) · 2.51 KB
/
deploy.sample.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
82
83
84
85
86
87
88
89
90
<?php
/**
* w-vision
*
* LICENSE
*
* For the full copyright and license information, please view the LICENSE.md
* file that is distributed with this source code.
*
* @copyright Copyright (c) 2018 w-vision AG (https://www.w-vision.ch)
*/
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('domain.com')
->user('username')
->port(22)
->set('deploy_path', '/home/home_dir')
->identityFile('PATH_TO_SSH_KEY')
->stage('dev')
->set('branch', 'master');
// Can be done via http as well.
set('repository', 'ssh://git@server:22/vendor/project.git');
// There may be some files or directories missing.
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/GeoLite2-City.mmdb',
'var/config/perspectives.php',
'var/config/customviews.php'
]);
set('shared_dirs', [
'web/var',
'var/email',
'var/recyclebin',
'var/versions',
'var/sessions'
]);
// The configuration files of pimcore that will be processed at creation
set('pimcore_shared_configurations', [
'var/config/website-settings.php',
'var/config/reports.php',
'var/config/web2print.php',
'var/config/workflowmanagement.php'
]);
// If your PHP executable is installed within a non standard path, use this:
/*set('bin/php', function () {
return '/opt/cpanel/ea-php70/root/usr/bin/php';
});*/
// If you want to use a custom composer file, use this
/*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', // Remove if you don't use yarn
'deploy:yarn:encore:production', // Remove if you don't use yarn
'deploy:pimcore:migrate:core',
'deploy:pimcore:migrate',
'deploy:clear_paths',
'deploy:pimcore:rebuild-classes',
'deploy:pimcore:custom-layouts-rebuild',
'deploy:symlink',
'deploy:unlock',
'cleanup',
'success'
])->desc('Deploy your project');
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');