Skip to content

sourcebroker/deployer-typo3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deployer-typo3

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

This package provides deploy task for deploying TYPO3 CMS with deployer (deployer.org).

  1. Install package with composer:

    composer require sourcebroker/deployer-typo3
    

    Its advisable that you put alias dep="vendor/bin/dep" in your ~/.profile to be able to run deployer with regular dep command. Otherwise you will need to run deployer like this ./vendor/bin/dep ...

  2. Put following lines on the beginning of your deploy.php:

    require_once(__DIR__ . '/vendor/sourcebroker/deployer-loader/autoload.php');
    new \SourceBroker\DeployerExtendedTypo3\Loader();
    
  3. Remove task "deploy" from your deploy.php. Otherwise you will overwrite deploy task defined in vendor/sourcebroker/deployer-typo3/deployer/default/deploy/task/deploy.php. Look at Example of working configuration to see how simple can be working deploy.php file.

    If you want to update language files on each deploy add task typo3cms:language:update before deploy_symlink. Read https://github.com/sourcebroker/deployer-typo3/discussions/14 to see why updating language labels on each deploy is very arguable and generally not advised.

    before('deploy_symlink', 'typo3cms:language:update');
    

Run:

dep deploy [host]

For TYPO3 13 the shared dirs are:

set('shared_dirs', function () {
    return [
      get('web_path') . 'fileadmin',
      get('web_path') . 'typo3temp/assets/_processed_',
      get('web_path') . 'typo3temp/assets/images',
      'var/charset',
      'var/lock',
      'var/log',
      'var/session',
    ];
});

The shared file for TYPO3 13 is:

set('shared_files', ['.env']);

You can set proper version of composer with composer_channel (values: 1, 2, stable, prelive, snapshot) or with composer_version which takes exact tags as arguments (https://github.com/composer/composer/tags). For stability and security it is advised that you set composer_channel with value 1 or 2 so it will be automatically updated but will not install any new major version in future so your deploy will remain fairly stable. The default value is 2.

set('composer_channel', 2);

This is example of working configuration for TYPO3 13. The aim of sourcebroker/deployer-typo3 is to have very slim deploy.php file in order to have nice possibility to upgrade to future versions of sourcebroker/deployer-typo3.

<?php

namespace Deployer;

require_once(__DIR__ . '/vendor/sourcebroker/deployer-loader/autoload.php');
new \SourceBroker\DeployerExtendedTypo3\Loader();

set('repository', '[email protected]:sourcebrokergit/t3base13.git');

host('production')
    ->setHostname('vm-dev.example.com')
    ->setRemoteUser('deploy')
    ->set('branch', 'master')
    ->set('bin/php', '/home/www/t3base13-public/production/.bin/php');
    ->set('public_urls', ['https://production-t3base13.example.com'])
    ->set('deploy_path', '/home/www/t3base13/production');

host('staging')
    ->setHostname('vm-dev.example.com')
    ->setRemoteUser('deploy')
    ->set('branch', 'master')
    ->set('bin/php', '/home/www/t3base13-public/staging/.bin/php');
    ->set('public_urls', ['https://staging-t3base13.example.com'])
    ->set('deploy_path', '/home/www/t3base13/staging');

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

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages