78 lines
1.9 KiB
PHP
78 lines
1.9 KiB
PHP
<?php
|
|
namespace Deployer;
|
|
|
|
require 'recipe/typo3.php';
|
|
|
|
set('typo3_webroot', 'public');
|
|
set('application', 'ep-reisen-typo3');
|
|
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'
|
|
]);
|
|
|
|
add('shared_dirs', [
|
|
'config/sites',
|
|
]);
|
|
|
|
host('production')
|
|
->hostname('host.3punkt0.com')
|
|
->user('ep-reisen')
|
|
->forwardAgent()
|
|
->multiplexing()
|
|
->set('deploy_path', '~/{{application}}')
|
|
->set('bin/php', '~/bin/php')
|
|
->set('http_user', 'ep-reisen')
|
|
->set('writable_mode', 'chmod')
|
|
->set('bin/composer', '/usr/bin/composer')
|
|
;
|
|
|
|
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');
|