-
Notifications
You must be signed in to change notification settings - Fork 144
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 have persistent folders inside tmp #315
Comments
@sl0wik is this for local development inside a Docker instance, or is this when deploying with Cloud Build? I'm struggling to understand the use case for needing this to persist. You mention Similarly for the view cache you mention, we made an artisan command to pre-compile all the views before deployment: This meant that everything sits inside the storage folder and is deployed alongside the application, reducing the need for anything to end up in For more general application cache, storing to |
@iamacarpet congrats for your package. I wish I checked it earlier. The package vs separate Laravel-based project approach is the subject of a long discussion. In general:
If we could simply have the option to create writeable folders, it would resolve majority of compatibility problems. It can be done today by symlinking but App would still need to make sure that folder exists in tmp. Copying |
Professional but more time-consuming solution would be adding to
Build script could copy those directories to |
I pushed changes to Laravel framework so the |
Most of PHP frameworks including Laravel require writable paths to maintain various types of caches (view cache, bootstrap cache, application cache etc). Because the only writeable path is
/tmp
, multiple caching systems using the same folder cause conflict possibility and eventual security risk. If/tmp
could have a persistent folder cache can be separated. It could be a single folder inside/tmp
for example/tmp/build
Proposed solution:
/tmp/build
folder could be persistent from build to production run stage.Impact:
Developer can create a folder on build and then symlink for example
/bootstrap/cache
to/tmp/build/boostrap/cache
maintaining complete framework compatibility without hackcs to change pre-set bootstrap cache paths to/tmp
.The text was updated successfully, but these errors were encountered: