docker-typo3
docker-typo3 copied to clipboard
Redis support
This was requested in https://github.com/martin-helmich/docker-typo3/issues/209#issuecomment-1259625173.
Adding Redis support would entail the following:
- [ ] The Docker image needs to be built with the PHP Redis extension. Currently, this image uses the official
php
library images (which may be subject to change, however), so adding the redis extension on top of those should be an easy fix. - [ ] Depending on the implementation state of https://github.com/martin-helmich/docker-typo3/issues/230, the TYPO3 configuration could also be adjusted automatically based on the presence of certain Redis-related environment variables.
- [ ] Documentation required.
Just for completeness sake I will like the Typo3 Documentation for Redis here: Typo 3 Documentation - Redis
From a standpoint of a drop-in configuration (for example that is generated by a script which then is fed by the ENV variables) this should be fairly easy as we can put this in a dedicated file. I would start with the example provided by the example from the docs and use getenv()
to load the actual values. The script would then depending on the value of CACHE_REDIS_ENABLED
(allowed values should be 0
or 1
) copy the file on container startup to config/system/additional.php
. This means that those options cannot be change via the install tool since the file is not touched by Typo 3. However further down the road it will get more complicated to build the additional.php
configuration file if we have multiple drop-in sections we want to pass, however I am confident that this is a solvable problem (I already have ideas).