I am creating a docker environment for a Symfony application. I have a container for each application with an attached data container for the web root that is associated with the application server. As part of simplifying security for the infrastructure, these data containers are read-only to prevent any remote code exploits. Each application also has a side car container that allows you to record magazines.
Symfony is currently writing cache cache_dirto the default location
${web_root}/app/cache/${env}
What is in the read-only data container
when I try to download the application, I get this error
Unable to write to cache directory
Obviously this will happen in a write-only container
I found that my log_path is set in parameters outside the read-only container in the sidecar read-write logging container
/data/logs/symfony
which works great.
I read a cookbook Symfony book on how to move around in the directory structure, but it only suggests how to do it in AppKernal.phpthat I do not want to do, because the path may vary depending on local/uat/prodthe environment.
We pass Symfony various parameters from our build server, depending on the environment in which we are deploying, so it makes sense to include this configuration here.
Does anyone know if it is possible to override it in the cache directory and not edit it AppKernal.php
source
share