Docker-PHP/laravel/laravel.runit

18 lines
614 B
Bash

#!/bin/bash
echo "Fixing laravel application permissions"
mkdir -f -p /app/storage /app/bootstrap/cache
find /app/storage -type d -exec chmod 777 {} \;
find /app/bootstrap/cache -type d -exec chmod 777 {} \;
find /app/storage -type f -not -name ".gitignore" -exec chmod 666 {} \;
find /app/bootstrap/cache -type f -exec chmod 666 {} \;
chmod 777 -R /app/storage
chmod +x /app/artisan
# Output the laravel log to the docker terminal.
tail -f /app/storage/logs/laravel-*.log /app/storage/logs/laravel.log &
# Sleep forever (and sleep again incase the sleep process is killed)
while true; do
sleep infinity
done