-
Notifications
You must be signed in to change notification settings - Fork 27
/
entrypoint-dev.sh
39 lines (32 loc) · 811 Bytes
/
entrypoint-dev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# Folders needed for persistence
folder_paths="
./storage/app/dictionaries
./storage/app/fonts
./storage/app/images/book_images
./storage/app/public
./storage/app/temp/dictionaries
./storage/framework/cache/data
./storage/framework/sessions
./storage/framework/testing
./storage/framework/views
./storage/logs
"
# Ensure the folders exist
for folder_path in $folder_paths; do
if [ ! -d "$folder_path" ]; then
mkdir -p "$folder_path"
echo "Folder created: $folder_path"
else
echo "Folder already exists: $folder_path"
fi
done
composer install \
&& npm install
retry_count=0
while [ $retry_count -lt 40 ] && ! php artisan migrate; do
sleep 15
retry_count=$((retry_count+1))
done
php artisan db:seed
exec "$@"