Files
website-typo3/deploy.php
T

71 lines
1.9 KiB
PHP

<?php
namespace Deployer;
require 'recipe/typo3.php';
set('typo3_webroot', 'web');
set('application', 'typo3-deployer');
set('repository', '[email protected]:dreipunktnull/ep-reisen-web');
set('git_tty', true);
set('ssh_type', 'native');
set('ssh_multiplexing', true);
set('allow_anonymous_stats', false);
add('shared_files', [
'{{typo3_webroot}}/typo3conf/LocalConfiguration.php'
]);
host('production')
->hostname('dreipunktnull.com')
->user('ssh-438277-ep-reisen')
->forwardAgent()
->set('deploy_path', '/kunden/13174_42857/kunden/typo3sites/ep-reisen/{{application}}')
->set('bin/php', '/usr/local/bin/php7-71STABLE-CLI -dapc.enable_cli=on -dextension_dir=/usr/local/lib/php_modules/7-72LATEST -dextension=apcu.so')
->set('http_user', 'ssh-438277-ep-reisen')
;
task('build', function () {
runLocally('npm i && npm run build');
});
task('upload:epevents', function () {
upload(
__DIR__ . '/web/typo3conf/ext/ep_events/Resources/Public/',
'{{release_path}}/web/typo3conf/ext/ep_events/Resources/Public'
);
});
task('upload:eptheme', function () {
upload(
__DIR__ . '/web/typo3conf/ext/ep_theme/Resources/Public/',
'{{release_path}}/web/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('cleanup', 'caches:flush');
before('cleanup', 'languages:update');
after('deploy:failed', 'deploy:unlock');