PHP code example of sourcebroker / deployer-typo3-media

1. Go to this page and download the library: Download sourcebroker/deployer-typo3-media library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sourcebroker / deployer-typo3-media example snippets


     new \SourceBroker\DeployerLoader\Loader([
     ['get' => 'sourcebroker/deployer-typo3-media'],
   ]);
   

   

   namespace Deployer;

   \Loader([
     ['get' => 'sourcebroker/deployer-typo3-media'],
   ]);

   host('production')
      ->setHostname('vm-dev.example.com')
      ->setRemoteUser('deploy')
      ->set('bin/php', '/usr/bin/php8.4')
      ->set('deploy_path', '~/t3base13/production');

   host('staging')
      ->setHostname('vm-dev.example.com')
      ->setRemoteUser('deploy')
      ->set('bin/php', '/usr/bin/php8.4')
      ->set('deploy_path', '~/t3base13/staging');
   

set('media', function () {
    return [
        'filter' => [
            '+ /' . get('web_path'),
            '+ /' . get('web_path') . 'fileadmin/',
            '- /' . get('web_path') . 'fileadmin/_processed_/*',
            '+ /' . get('web_path') . 'fileadmin/**',
            '- *'
        ]
    ];
});