Commit 20284ee2 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix log permission: touch and chown laravel.log in entrypoint

CapRover volume remounts can override build-time chown, leaving
storage/logs owned by root. Explicitly touch + chown the log file
at container start before php-fpm runs.
Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent cf73fb82
...@@ -11,9 +11,13 @@ mkdir -p \ ...@@ -11,9 +11,13 @@ mkdir -p \
storage/logs \ storage/logs \
bootstrap/cache bootstrap/cache
# Fix permissions # Fix permissions — run as root before supervisord drops to www-data
chown -R www-data:www-data storage bootstrap/cache chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache chmod -R 775 storage bootstrap/cache
# Ensure log file exists and is writable (CapRover volumes can remount with wrong owner)
touch storage/logs/laravel.log
chown www-data:www-data storage/logs/laravel.log
chmod 664 storage/logs/laravel.log
# Build .env from Docker env vars (CapRover passes them as container env) # Build .env from Docker env vars (CapRover passes them as container env)
: > .env : > .env
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment