Commit eab37d7f authored by Joachim Mathes's avatar Joachim Mathes

TASK: Create database dump symlink on deployment

parent c35b9921
<?php
use TYPO3\Flow\Utility\Files;
/** @var $deployment TYPO3\Surf\Domain\Model\Deployment "injected" into this script from Surf */
$baseUrl = 'https://vpro0100.proserver.punkt.de/';
......@@ -29,13 +27,15 @@ $application
$deployment->addApplication($application);
$deployment->onInitialize(function() use ($deployment) {
$deployment->getWorkflow()
->removeTask('TYPO3\\Surf\\Task\\TYPO3\\CMS\\CreatePackageStatesTask')
->defineTask('pt:DeleteDirectoriesTask', 'TYPO3\\Surf\\Task\\ShellTask', [
'command' => 'rm -rf {releasePath}/html/fileadmin {releasePath}/html/uploads'
])
->beforeTask('TYPO3\\Surf\\Task\\TYPO3\\CMS\\SymlinkDataTask', 'pt:DeleteDirectoriesTask')
->defineTask('pt:RestartPhpFpmTask', 'TYPO3\\Surf\\Task\\ShellTask', [
'command' => 'sudo /usr/local/etc/rc.d/php-fpm restart'
])
->forStage('cleanup', 'pt:RestartPhpFpmTask');
->setTaskOptions('TYPO3\\Surf\\Task\\Generic\\CreateSymlinksTask', ['symlinks' => ['html/sql' => '../../../shared/Sql']])
->removeTask('TYPO3\\Surf\\Task\\TYPO3\\CMS\\CreatePackageStatesTask')
->defineTask('pt:DeleteDirectoriesTask', 'TYPO3\\Surf\\Task\\ShellTask', [
'command' => 'rm -rf {releasePath}/html/fileadmin {releasePath}/html/uploads'
])
->beforeTask('TYPO3\\Surf\\Task\\TYPO3\\CMS\\SymlinkDataTask', 'pt:DeleteDirectoriesTask')
->defineTask('pt:RestartPhpFpmTask', 'TYPO3\\Surf\\Task\\ShellTask', [
'command' => 'sudo /usr/local/etc/rc.d/php-fpm restart'
])
->forStage('cleanup', 'TYPO3\\Surf\\Task\\Generic\\CreateSymlinksTask')
->forStage('cleanup', 'pt:RestartPhpFpmTask');
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment