Skip to content

Instantly share code, notes, and snippets.

@cedricziel
Created September 26, 2016 14:59
Show Gist options
  • Save cedricziel/071d7fe3abab454a4fb4970233defa21 to your computer and use it in GitHub Desktop.
Save cedricziel/071d7fe3abab454a4fb4970233defa21 to your computer and use it in GitHub Desktop.
<?php
// ...
/*
* we resolve most options from the environment.
* $resolvedOptions is a result of some computation earlier and contains most options
* at this point in time
*/
$node = new \TYPO3\Surf\Domain\Model\Node($resolvedOptions['hostname']);
$node->setHostname($resolvedOptions['hostname'])
->setOption('username', $resolvedOptions['username'])
->setOption('password', $resolvedOptions['password'])
// composerCommandPath is what you want, it's the absolute path on the target host,
// or in this case prefixed with the correct interpreter
->setOption(
'composerCommandPath',
'/usr/local/bin/php7-70STABLE-CLI /kunden/***/***/***/***/composer.phar'
);
// Use Application Type neos only, if you want your exported site
// to be imported on any deployment
$application = new \TYPO3\Surf\Application\TYPO3\Flow('host.project.de');
$application->setDeploymentPath($resolvedOptions['deployment_path'])
->setOption('repositoryUrl', $resolvedOptions['repository_url'])
->setOption('keepReleases', '5')
->setOption('sha1', $resolvedOptions['sha1'])
->addNode($node);
$workflow = new \TYPO3\Surf\Domain\Model\SimpleWorkflow();
$deployment->setWorkflow($workflow);
$deployment->addApplication($application);
# Configuration/Production/Settings.yaml
# ...
TYPO3:
Flow:
core:
phpBinaryPathAndFilename: '/usr/local/bin/php7-70STABLE-CLI'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment