sourcebroker/deployer-typo3-media

Media sync for TYPO3 with deployer-extended-media.

0.0.3 2025-03-03 19:38 UTC

This package is auto-updated.

Last update: 2025-03-03 19:39:34 UTC


README

http://img.shields.io/packagist/v/sourcebroker/deployer-typo3-media.svg?style=flat https://img.shields.io/badge/license-MIT-blue.svg?style=flat

Notice (!!!)

This is experimental package for now. Do not use it yet.

What does it do?

This package provides settings to use package sourcebroker/deployer-extended-media with TYPO3 CMS. It allows to sync media between instances.

Installation

  1. Install package with composer:

    composer require sourcebroker/deployer-typo3-media
    
  2. Put following lines on the beginning of your deploy.php:

    require_once(__DIR__ . '/vendor/autoload.php');
    new \SourceBroker\DeployerLoader\Loader([
      ['get' => 'sourcebroker/deployer-typo3-media'],
    ]);
    

    If you have some conflicts of packages between your root project and deployer.phar you can try to use /vendor/sourcebroker/deployer-loader/autoload.php instead of /vendor/autoload.php.

Synchronizing media

The command for synchronizing media from production to local instance (usually your laptop):

dep media:pull production

Command for synchronizing media from production to staging instance is:

dep media:copy production --options=target:staging

Command for synchronizing media from production to staging, creating symlinks to each file in shared folder if both instances are at the same server. Good to safe space on disk:

dep media:link production --options=target:staging

Example of working configuration

This is example of working configuration for TYPO3 13.

<?php

namespace Deployer;

require_once(__DIR__ . '/vendor/autoload.php');
new \SourceBroker\DeployerLoader\Loader([
  ['get' => 'sourcebroker/deployer-typo3-media'],
]);

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

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

localhost('local')
    ->set('bin/php', 'php')
    ->set('deploy_path', getcwd());

Changelog

See https://github.com/sourcebroker/deployer-typo3-media/blob/master/CHANGELOG.rst