Move typo3temp into RAM-Disk. Do not sync vendor and TYPO3-Directory.

May 28, 2020 · View on GitHub

For MAC: 'nocopy' will only work correct, if nfs_mount_enabled is true

version: '3.6' services: web: volumes: - type: tmpfs tmpfs: size: 268435456 # TYPO3 8 target: /var/www/html/public/typo3temp/var/Cache # TYPO3 9 and 10 target: /var/www/html/var - type: volume source: typo3_source_[shortProjectName] target: /var/www/html/public/typo3 volume: nocopy: true - type: volume source: vendor_[shortProjectName] target: /var/www/html/vendor volume: nocopy: true environment: DDEV_UID: DDEV_GID: volumes: typo3_source_[shortProjectName]: driver: local vendor_[shortProjectName]: driver: local

Add these lines (un-commented) to config.yaml to change restriction from root to current user

hooks: post-start: - exec: bash -c "sudo mkdir -p /var/www/html/public/typo3" - exec: bash -c "sudo chown -R DDEVUID:{DDEV_UID}:{DDEV_GID} /var/www/html/public/typo3" - exec: bash -c "sudo mkdir -p /var/www/html/vendor" - exec: bash -c "sudo chown -R DDEVUID:{DDEV_UID}:{DDEV_GID} /var/www/html/vendor" # TYPO3 8 - exec: bash -c "sudo mkdir -p /var/www/html/public/typo3temp" - exec: bash -c "sudo chown -R DDEVUID:{DDEV_UID}:{DDEV_GID} /var/www/html/public/typo3temp" # TYPO3 9 and 10. Do not add cache directory, as TYPO3 renames the folder before deletion - exec: bash -c "sudo mkdir -p /var/www/html/var" - exec: bash -c "sudo chown -R DDEVUID:{DDEV_UID}:{DDEV_GID} /var/www/html/var"

Move TYPO3 10 Caches into RAM-Disk. Modify AdditionalConfiguration.php.

For TYPO3 < 10 you have to add "cache_" for each Cache. F.e. cache_rootline

GLOBALS[TYPO3CONFVARS][SYS][caching][cacheConfigurations][extbase][backend]=\TYPO3\CMS\Core\Cache\Backend\ApcuBackend::class;GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase']['backend'] = \TYPO3\CMS\Core\Cache\Backend\ApcuBackend::class; GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase']['options'] = []; GLOBALS[TYPO3CONFVARS][SYS][caching][cacheConfigurations][rootline][backend]=\TYPO3\CMS\Core\Cache\Backend\ApcuBackend::class;GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['rootline']['backend'] = \TYPO3\CMS\Core\Cache\Backend\ApcuBackend::class; GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['rootline']['options'] = []; GLOBALS[TYPO3CONFVARS][SYS][caching][cacheConfigurations][hash][backend]=\TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class;GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['hash']['backend'] = \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class; GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['hash']['options'] = []; GLOBALS[TYPO3CONFVARS][SYS][caching][cacheConfigurations][pages][backend]=\TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class;GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages']['backend'] = \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class; GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages']['options'] = []; GLOBALS[TYPO3CONFVARS][SYS][caching][cacheConfigurations][pagesection][backend]=\TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class;GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pagesection']['backend'] = \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class; GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pagesection']['options'] = [];

Add this line only for TYPO3 < 10

$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['imagesizes']['backend'] = \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class;