Last active
January 3, 2016 21:29
-
-
Save LarsNieuwenhuizen/8521949 to your computer and use it in GitHub Desktop.
My TYPO3 Surf deployment for a TYPO3 website.Credits for \GrandSlam\Surf\Application\TYPO3\CMS go to Jesper Paardekooper: https://github.com/jp1987/GrandSlam.SurfHere all the functions are found for DB compare, symlinking folders like uploads, typo3temp and fileadmin and clearing the cache.Easy to create, easier to use :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "typo3/flow-base-distribution", | |
"description" : "TYPO3 Flow Base Distribution", | |
"license": "LGPL-3.0+", | |
"config": { | |
"vendor-dir": "Packages/Libraries", | |
"bin-dir": "bin" | |
}, | |
"repositories": { | |
"GrandSlam": { | |
"type": "package", | |
"package": { | |
"name": "lars89/GrandSlam.Surf", | |
"version": "1.0.0", | |
"source": { | |
"url": "https://github.com/lars89/GrandSlam.Surf.git", | |
"type": "git", | |
"reference": "master" | |
} | |
} | |
} | |
}, | |
"require": { | |
"typo3/flow": "2.1.*", | |
"typo3/surf": "dev-master", | |
"doctrine/migrations": "@dev", | |
"lars89/GrandSlam.Surf": "1.0.0" | |
}, | |
"require-dev": { | |
"typo3/kickstart": "2.1.*", | |
"typo3/buildessentials": "2.1.*", | |
"mikey179/vfsstream": "1.2.*" | |
}, | |
"suggest": { | |
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required" | |
}, | |
"scripts": { | |
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall", | |
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall", | |
"post-package-update":"TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall", | |
"post-package-install":"TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use \TYPO3\Surf\Domain\Model\Workflow; | |
use \TYPO3\Surf\Domain\Model\Node; | |
use \TYPO3\Surf\Domain\Model\SimpleWorkflow; | |
$application = new \GrandSlam\Surf\Application\TYPO3\CMS('My Website'); | |
$application->setContext('Test'); | |
$application->setDeploymentPath('/deployment'); | |
$application->setOption('keepReleases', 4); | |
$application->setOption('repositoryUrl', 'ssh://git@myrepository.git'); | |
$application->setOption('typo3.surf:gitCheckout[branch]', 'development'); | |
$application->setOption('composerCommandPath', '/deployment/composer.phar'); | |
$application->setOption('webserverUsername', 'differentuser'); | |
$application->setOption('webserverGroupname', 'differentgroup'); | |
$application->setOption('compareDatabase', TRUE); | |
$application->setOption('setFileMask', TRUE); | |
$deployment->addApplication($application); | |
$workflow = new SimpleWorkflow(); | |
$workflow->setEnableRollback(TRUE); | |
$deployment->setWorkflow($workflow); | |
$node = new Node('testurl.nl'); | |
$node->setHostname('testurl.nl'); | |
$node->setOptions(array( | |
'port' => 22, | |
'username' => 'username', | |
)); | |
$deployment->onInitialize(function() use ($workflow, $application) { | |
$workflow->removeTask('typo3.surf:typo3:flow:symlinkconfiguration'); | |
}); | |
$application->addNode($node); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment