This package provides a deploy task for deploying TYPO3 CMS with Deployer (deployer.org).
-
Install package with composer:
composer require sourcebroker/deployer-typo3-deploy
-
Put the following lines at the beginning of your
deploy.php
:require_once(__DIR__ . '/vendor/autoload.php'); new \SourceBroker\DeployerLoader\Loader([ ['get' => 'sourcebroker/deployer-typo3-deploy'], ]);
-
Remove the task "deploy" from your
deploy.php
. Otherwise, you will overwrite the deploy task defined invendor/sourcebroker/deployer-typo3-deploy/deployer/default/deploy/task/deploy.php
. Look at Example of working configuration to see how simple a workingdeploy.php
file can be.
This is an example of a working configuration for TYPO3 13.
The aim of sourcebroker/deployer-typo3-deploy
is to have a very slim deploy.php
file
in order to make it easy to upgrade to future versions of sourcebroker/deployer-typo3-deploy
.
<?php
namespace Deployer;
require_once('./vendor/autoload.php');
new \SourceBroker\DeployerLoader\Loader([
['get' => 'sourcebroker/deployer-typo3-deploy'],
]);
set('repository', '[email protected]:sourcebrokergit/t3base13.git');
task('deploy:writable')->disable(); // Disable deploy:writable task if httpd user is the same as ssh user.
host('production')
->setHostname('vm-dev.example.com')
->setRemoteUser('deploy')
->set('branch', 'main')
->set('bin/php', '/usr/bin/php84')
->set('public_urls', ['https://production-t3base13.example.com'])
->set('deploy_path', '~/t3base13/production');
host('staging')
->setHostname('vm-dev.example.com')
->setRemoteUser('deploy')
->set('branch', 'develop')
->set('bin/php', '/usr/bin/php84')
->set('public_urls', ['https://staging-t3base13.example.com'])
->set('deploy_path', '~/t3base13/staging');
See CHANGELOG.rst