-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Provides a way to override cache and log folders from the ENV #37114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this. Thank you.
Why limiting this feature to the MicroKernelTrait and not having it in the base Kernel class? It might be confusing. |
very good question @GromNaN I think the Kernel is to be really generic where the Trait is more related to Flex and Symfony a Framework (vs as a Component) So I will let you guys decide, but I vote for the Trait ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the trait is the correct location to provide some opinionated defaults (even the name of the env vars is opinionated)
Thank you @Plopix. |
Not an issue, but I thought the default value was already very opinionated. |
…e ENV (Plopix) This PR was merged into the master branch. Discussion ---------- Provides a way to override cache and log folders from the ENV Related to this new feature symfony/symfony#37114. But I wonder if we have not oversimplified this PR: symfony/symfony#37114 Actually doing the documentation #13787 I figured that with #37114 we removed the important split per `env`. In development mode (docker or not) we could definitely have the same project working in N Symfony different environments and this new `APP_CACHE_DIR` will only set the same path for all environments. That would be manageable in the Virtualhost but in CLI that would be a pain to manage. Also, we could rely on the DotEnv mechanism, but that could be really easy to forget. I wonder if we should not change the code to: symfony/symfony#37232 Depending on the decisions I will update the doc here. Commits ------- 88b081c Provides a way to override cache and log folders from the ENV
When using Docker and especially on Mac OS X, performances are terrible when using a "mount" on the host inside the container. (which happens by default)
To optimize the performances, one of the tricks is to change where the application is going to write the cache and the logs.
This PR provides a new env variables
APP_CACHE_DIR
andAPP_LOG_DIR
which can be set to change where will be saved the caches and the logs.I know we can do it per project BUT:
Bring back SYMFONY_TMP_DIR (in another form) for Docker optimization ezsystems/ezplatform#543
Let me know