Deploy using rsync
This commit is contained in:
+52
-36
@@ -2,6 +2,7 @@
|
||||
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');
|
||||
@@ -30,50 +31,65 @@ host('185.237.67.190')
|
||||
->set('deploy_path', '/home/www/p546128/html/{{application}}')
|
||||
->set('bin/php', '/usr/local/bin/php')
|
||||
->set('http_user', 'p546128')
|
||||
->set('writable_mode', 'chmod')
|
||||
->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')
|
||||
;
|
||||
|
||||
task('build', function () {
|
||||
runLocally('npm i && npm run build');
|
||||
});
|
||||
|
||||
task('upload:epevents', function () {
|
||||
upload(
|
||||
__DIR__ . '/public/typo3conf/ext/ep_events/Resources/Public/',
|
||||
'{{release_path}}/public/typo3conf/ext/ep_events/Resources/Public'
|
||||
);
|
||||
});
|
||||
|
||||
task('upload:eptheme', function () {
|
||||
upload(
|
||||
__DIR__ . '/public/typo3conf/ext/ep_theme/Resources/Public/',
|
||||
'{{release_path}}/public/typo3conf/ext/ep_theme/Resources/Public'
|
||||
);
|
||||
});
|
||||
|
||||
task('assets', [
|
||||
'build',
|
||||
'upload:epevents',
|
||||
'upload:eptheme',
|
||||
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('caches:flush', 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 () {
|
||||
task('typo3:database:migrate', function () {
|
||||
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms database:updateschema');
|
||||
});
|
||||
|
||||
before('deploy:symlink', 'assets');
|
||||
before('deploy:symlink', 'database:update');
|
||||
before('deploy:symlink', 'languages:update');
|
||||
before('cleanup', 'caches:flush');
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user