-
Notifications
You must be signed in to change notification settings - Fork 63
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
Option to not run config:cache? #105
Comments
First reaction is that config cache and other optimisations, should not happen during local dev. But on the other hand, one should be able to replicate full prod setup locally. So that probably means we should be able to (optionally?) disable this behaviour locally. @tillkruss what's your feeling on this? |
If needed, we could set an env variable in the Do you think there are other behaviors like these that we wouldn't want to reproduce when developing locally?
Oh, maybe one option is to enable/disable these behaviors based on the APP_ENV of Laravel? (and not based on the Docker image) |
Yeah sounds good. Maybe even something like: $shouldCache = env('BREF_LARAVEL_CACHE_CONFIG', env('APP_ENV') === 'production')
// or
$shouldCache = env('BREF_LARAVEL_CACHE_CONFIG', env('APP_ENV') !== 'local') |
Sounds like an even better idea! (the second one sounds better I think because you could deploy "staging" environments for example) |
Yeah, I'd agree that routes and the config doesn't need to be cached in |
Is there an update on this case? $shouldCache = env('BREF_LARAVEL_CACHE_CONFIG', env('APP_ENV') ! == 'local') Can I create a PR using the following? |
@sunaoka hi! Yes feel free to create a PR! |
Could there be an option to not run config:cache?
We are a development locally using
bref/php-*-fpm-dev:2
.Every time we change the
.env
, we have to restart the docker container, which is very tedious.The text was updated successfully, but these errors were encountered: