serversideup / docker-php

🐳 Production-ready Docker images for PHP. Optimized for Laravel, WordPress, and more!
https://serversideup.net/open-source/docker-php/
GNU General Public License v3.0
1.65k stars 108 forks source link

Adds storage directories recreation #401

Open DarkGhostHunter opened 1 month ago

DarkGhostHunter commented 1 month ago

As title says. Sometimes you will mount the /storage path elsewhere for persistence. Laravel sometimes doesn't play nice if any of these are missing, like using view:clear which gives an error when the cache view directory doesn't exist.

The AUTORUN_LARAVEL_STORAGE_RECREATE environment variables re-creates the storage directories used by Laravel:

image

It's opt-in.