From c9bbeeeb14e1b201cad26305cc13a10cf8ebd3fa Mon Sep 17 00:00:00 2001 From: Giovanni-Josserand Date: Sat, 28 Mar 2026 11:50:56 +0100 Subject: [PATCH] create setup_laravel script --- docker/php/scripts/setup_laravel.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docker/php/scripts/setup_laravel.sh diff --git a/docker/php/scripts/setup_laravel.sh b/docker/php/scripts/setup_laravel.sh new file mode 100644 index 0000000..473dbe7 --- /dev/null +++ b/docker/php/scripts/setup_laravel.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +setup_laravel() { + echo "Setting up Laravel..." + + run php artisan key:generate --force + run php artisan config:clear + run php artisan cache:clear + run php artisan migrate --force --seed + + if [ "$IS_DEV" = 1 ]; then + chmod -R 775 storage bootstrap/cache + chmod -R 755 public + else + chown -R www-data:www-data storage bootstrap/cache + chmod -R 775 storage bootstrap/cache + fi + + run php artisan storage:link +}