To spin up a container with Varnish cache and use it as a cache solution follow these steps:
- Uncomment lines with varnish service definition in the compose file.
- Download and install varnish module
- Add the following lines to the settings.php file:
$conf['varnish_version'] = 4; $conf['varnish_control_terminal'] = 'varnish:6082'; $conf['varnish_control_key'] = 'secret';
Configuration is possible via environment variables. See the full list of variables on GitHub.