Files
website-typo3/deploy.php
T

80 lines
2.1 KiB
PHP

<?php
namespace Deployer;
require 'vendor/deployer/deployer/recipe/typo3.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',
]);
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('writable_mode', 'chmod')
->set('bin/composer', '/usr/local/bin/composer')
->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('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 () {
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');
after('deploy:failed', 'deploy:unlock');