Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/common/etc/entrypoint.d/50-laravel-automations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ if [ "$DISABLE_DEFAULT_CONFIG" = "false" ]; then
# Check to see if an Artisan file exists and assume it means Laravel is configured.
if [ -f "$APP_BASE_DIR/artisan" ] && [ "$AUTORUN_ENABLED" = "true" ]; then
echo "Checking for Laravel automations..."

############################################################################
# recreate storage
############################################################################
if [ "${AUTORUN_LARAVEL_STORAGE_RECREATE:=true}" = "true" ]; then

storage_paths='storage/app/public storage/framework/cache/data storage/framework/sessions storage/framework/testings storage/framework/views storage/logs'

for path in ${storage_paths}; do
if [ ! -d "$path" ]; then
mkdir -p "$path"
echo "✅ Recreated [$path] directory."
fi
done

############################################################################
# artisan migrate
############################################################################
Expand Down