🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@Plopix
Copy link
Contributor

@Plopix Plopix commented May 13, 2020

There is a slack discussion in #ez-launchpad.
But I prefer to open that PR to the community.

Without this, there is no way to tell Docker to save the Symfony cache in the container rather than in the host.

On Mac OS this is a performance killer.

On 2.5 we still have it, why has it been removed?
https://github.com/ezsystems/ezplatform/blob/2.5/app/AppKernel.php#L84

Thanks!

@SerheyDolgushev
Copy link
Contributor

@Plopix maybe it also worth to add those variables in default .env file?

@SerheyDolgushev
Copy link
Contributor

I mean just two variables for cache and logs dirs?

@Plopix
Copy link
Contributor Author

Plopix commented May 13, 2020

not sure about complexifying more the .env as to me, there are already too much info in it. but yes that's a good point ;-)

@webhdx
Copy link
Contributor

webhdx commented Jun 5, 2020

Hello @Plopix. I removed it because we don't want to do any changes to Kernel.php. We intent to use Flex in the future so any change here won't be available to installations using Flex to install eZ Platform on existing Symfony projects. I think it would be a good contribution to Symfony.

@Plopix
Copy link
Contributor Author

Plopix commented Jun 5, 2020

ok @webhdx symfony/symfony#37114 let's see

@Plopix
Copy link
Contributor Author

Plopix commented Jun 5, 2020

it's going to be approved I guess but that would be for Symfony 5.2 anyway. It might make sense to anticipate in eZ for now on. (instead of waiting eZ 3.2 or even 3.3)
what do you think?

@Plopix Plopix changed the title Bring back SYMFONY_TMP_DIR for Docker optimization Bring back SYMFONY_TMP_DIR (in another form) for Docker optimization Jun 5, 2020
fabpot added a commit to symfony/symfony that referenced this pull request Jun 9, 2020
…the ENV (Plopix)

This PR was merged into the 5.2-dev branch.

Discussion
----------

Provides a way to override cache and log folders from the ENV

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

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` and `APP_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:
- I think that is a good addition to Symfony
- it would allow project like eZ Platform and eZ Launchpad to automate that optimization
ezsystems/ezplatform#543

Let me know

Commits
-------

5fa5d36 Provides a way to override cache and log folders form the ENV
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull request Jun 9, 2020
…the ENV (Plopix)

This PR was merged into the 5.2-dev branch.

Discussion
----------

Provides a way to override cache and log folders from the ENV

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

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` and `APP_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:
- I think that is a good addition to Symfony
- it would allow project like eZ Platform and eZ Launchpad to automate that optimization
ezsystems/ezplatform#543

Let me know

Commits
-------

5fa5d36153 Provides a way to override cache and log folders form the ENV
@Plopix
Copy link
Contributor Author

Plopix commented Jun 11, 2020

Please wait a bit before merge, maybe we need: symfony/symfony#37232

Copy link
Contributor

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA approved on eZPlatform 3.1dev with diff.

@lserwatka
Copy link
Member

@Plopix is anything holding us back to merge it?

@lserwatka lserwatka merged commit 88a76d9 into ezsystems:master Jun 22, 2020
@lserwatka
Copy link
Member

@mnocon could you merge it up and sideways?

@lserwatka
Copy link
Member

Thank you @Plopix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

6 participants