Deploy using rsync
This commit is contained in:
+52
-36
@@ -2,6 +2,7 @@
|
|||||||
namespace Deployer;
|
namespace Deployer;
|
||||||
|
|
||||||
require 'vendor/deployer/deployer/recipe/typo3.php';
|
require 'vendor/deployer/deployer/recipe/typo3.php';
|
||||||
|
require 'vendor/deployer/recipes/recipe/rsync.php';
|
||||||
require 'vendor/deployer/recipes/recipe/cachetool.php';
|
require 'vendor/deployer/recipes/recipe/cachetool.php';
|
||||||
|
|
||||||
set('typo3_webroot', 'public');
|
set('typo3_webroot', 'public');
|
||||||
@@ -30,50 +31,65 @@ host('185.237.67.190')
|
|||||||
->set('deploy_path', '/home/www/p546128/html/{{application}}')
|
->set('deploy_path', '/home/www/p546128/html/{{application}}')
|
||||||
->set('bin/php', '/usr/local/bin/php')
|
->set('bin/php', '/usr/local/bin/php')
|
||||||
->set('http_user', 'p546128')
|
->set('http_user', 'p546128')
|
||||||
->set('writable_mode', 'chmod')
|
|
||||||
->set('bin/composer', '/usr/local/bin/composer')
|
->set('bin/composer', '/usr/local/bin/composer')
|
||||||
|
->set('rsync_src', __DIR__)
|
||||||
|
->set('rsync', [
|
||||||
|
'exclude' => [
|
||||||
|
'.ddev',
|
||||||
|
'.git',
|
||||||
|
'.github',
|
||||||
|
'node_modules',
|
||||||
|
'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,
|
||||||
|
])
|
||||||
->set('cachetool_args', '--web --web-path={{release_path}}/public/ --web-url=https://www.ep-reisen.de')
|
->set('cachetool_args', '--web --web-path={{release_path}}/public/ --web-url=https://www.ep-reisen.de')
|
||||||
;
|
;
|
||||||
|
|
||||||
task('build', function () {
|
task('deploy', [
|
||||||
runLocally('npm i && npm run build');
|
'deploy:info',
|
||||||
});
|
'deploy:prepare',
|
||||||
|
'deploy:lock',
|
||||||
task('upload:epevents', function () {
|
'deploy:release',
|
||||||
upload(
|
'rsync',
|
||||||
__DIR__ . '/public/typo3conf/ext/ep_events/Resources/Public/',
|
'deploy:clear_paths',
|
||||||
'{{release_path}}/public/typo3conf/ext/ep_events/Resources/Public'
|
'deploy:shared',
|
||||||
);
|
'typo3:database:migrate',
|
||||||
});
|
'typo3:language:update',
|
||||||
|
'typo3:cache:flush',
|
||||||
task('upload:eptheme', function () {
|
'deploy:symlink',
|
||||||
upload(
|
'deploy:unlock',
|
||||||
__DIR__ . '/public/typo3conf/ext/ep_theme/Resources/Public/',
|
'cachetool:clear:opcache',
|
||||||
'{{release_path}}/public/typo3conf/ext/ep_theme/Resources/Public'
|
'cleanup',
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
task('assets', [
|
|
||||||
'build',
|
|
||||||
'upload:epevents',
|
|
||||||
'upload:eptheme',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
task('caches:flush', function () {
|
task('typo3:database:migrate', function () {
|
||||||
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms cache:flush');
|
|
||||||
});
|
|
||||||
|
|
||||||
task('languages:update', function () {
|
|
||||||
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms language:update');
|
|
||||||
});
|
|
||||||
|
|
||||||
task('database:update', function () {
|
|
||||||
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms database:updateschema');
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms database:updateschema');
|
||||||
});
|
});
|
||||||
|
|
||||||
before('deploy:symlink', 'assets');
|
task('typo3:language:update', function () {
|
||||||
before('deploy:symlink', 'database:update');
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms language:update');
|
||||||
before('deploy:symlink', 'languages:update');
|
});
|
||||||
before('cleanup', 'caches:flush');
|
|
||||||
|
task('typo3:cache:flush', function () {
|
||||||
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms cache:flush');
|
||||||
|
});
|
||||||
|
|
||||||
after('deploy:failed', 'deploy:unlock');
|
after('deploy:failed', 'deploy:unlock');
|
||||||
|
|||||||
Reference in New Issue
Block a user