117 lines
3.0 KiB
PHP
117 lines
3.0 KiB
PHP
<?php
|
|
namespace Deployer;
|
|
|
|
require 'vendor/deployer/deployer/recipe/typo3.php';
|
|
require 'vendor/deployer/recipes/recipe/rsync.php';
|
|
require 'vendor/deployer/recipes/recipe/cachetool.php';
|
|
|
|
set('typo3_webroot', 'public');
|
|
set('application', 'ep-reisen-typo3');
|
|
set('repository', '[email protected]:dreipunktnull/ep-reisen-web');
|
|
|
|
set('git_tty', false);
|
|
set('ssh_type', 'native');
|
|
|
|
set('allow_anonymous_stats', false);
|
|
|
|
add('shared_files', [
|
|
'{{typo3_webroot}}/typo3conf/LocalConfiguration.php',
|
|
'{{typo3_webroot}}/sinkhole.html',
|
|
]);
|
|
|
|
add('shared_dirs', [
|
|
'config/sites',
|
|
]);
|
|
|
|
$rsyncOptions = [
|
|
'exclude' => [
|
|
'.ddev',
|
|
'.DS_Store',
|
|
'.git',
|
|
'.github',
|
|
'.idea',
|
|
'node_modules',
|
|
'public/fileadmin',
|
|
'public/typo3temp',
|
|
'public/uploads',
|
|
'var',
|
|
'.editorconfig',
|
|
'.gitignore',
|
|
'.htaccess_prod',
|
|
'deploy.php',
|
|
'package.json',
|
|
'package-lock.json',
|
|
'postcss.config.js',
|
|
'tailwind.config.js',
|
|
'webpack.config.js',
|
|
],
|
|
'exclude-file' => false,
|
|
'include' => [],
|
|
'include-file' => false,
|
|
'filter' => [],
|
|
'filter-file' => false,
|
|
'filter-perdir' => false,
|
|
'flags' => 'rz',
|
|
'options' => ['delete', 'links'],
|
|
'timeout' => 300,
|
|
];
|
|
|
|
host('185.237.67.190')
|
|
->stage('production')
|
|
->user('p546128')
|
|
->forwardAgent()
|
|
->multiplexing()
|
|
->set('deploy_path', '/home/www/p546128/html/{{application}}')
|
|
->set('bin/php', '/usr/local/bin/php')
|
|
->set('http_user', 'p546128')
|
|
->set('bin/composer', '/usr/local/bin/composer')
|
|
->set('rsync_src', __DIR__)
|
|
->set('rsync', $rsyncOptions)
|
|
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{release_path}}/public/ --web-url=https://www.ep-reisen.de')
|
|
;
|
|
|
|
host('185.237.67.190')
|
|
->stage('staging')
|
|
->user('p546128')
|
|
->forwardAgent()
|
|
->multiplexing()
|
|
->set('deploy_path', '/home/www/p546128/html/{{application}}-staging')
|
|
->set('bin/php', '/usr/local/bin/php')
|
|
->set('http_user', 'p546128')
|
|
->set('bin/composer', '/usr/local/bin/composer')
|
|
->set('rsync_src', __DIR__)
|
|
->set('rsync', $rsyncOptions)
|
|
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{release_path}}/public/ --web-url=https://staging.ep-reisen.de')
|
|
;
|
|
|
|
task('deploy', [
|
|
'deploy:info',
|
|
'deploy:prepare',
|
|
'deploy:lock',
|
|
'deploy:release',
|
|
'rsync',
|
|
'deploy:clear_paths',
|
|
'deploy:shared',
|
|
'typo3:database:migrate',
|
|
'typo3:language:update',
|
|
'typo3:cache:flush',
|
|
'deploy:symlink',
|
|
'deploy:unlock',
|
|
'cachetool:clear:opcache',
|
|
'cleanup',
|
|
]);
|
|
|
|
task('typo3:database:migrate', function () {
|
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms database:updateschema');
|
|
});
|
|
|
|
task('typo3:language:update', function () {
|
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms language:update');
|
|
});
|
|
|
|
task('typo3:cache:flush', function () {
|
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms cache:flush');
|
|
});
|
|
|
|
after('deploy:failed', 'deploy:unlock');
|