diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index f4e636ed..63b0fe2f 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -84,6 +84,11 @@ php artisan event:cache echo "Creating storage link..." php artisan storage:link 2>/dev/null || true +# Re-apply storage ownership after artisan commands (may have created root-owned files) +echo "Re-applying storage ownership..." +chown -R www-data:www-data /app/storage /app/bootstrap/cache +chmod -R 775 /app/storage /app/bootstrap/cache + echo "=== Startup complete, launching services ===" # Start supervisor diff --git a/docker/supervisor/supervisord.conf b/docker/supervisor/supervisord.conf index b712c902..c39743ed 100644 --- a/docker/supervisor/supervisord.conf +++ b/docker/supervisor/supervisord.conf @@ -49,6 +49,7 @@ stderr_logfile=/var/log/redis.log [program:inertia-ssr] process_name=%(program_name)s_%(process_num)02d command=bash -c 'exec php /app/artisan inertia:start-ssr --runtime=bun' +user=www-data autostart=true autorestart=true stderr_logfile=/var/log/worker-inertia-ssr.log @@ -57,6 +58,7 @@ stdout_logfile=/var/log/worker-inertia-ssr.log [program:queue-worker-emails] process_name=%(program_name)s command=php /app/artisan queue:work database --queue=emails --sleep=1 --tries=5 --max-time=3600 +user=www-data autostart=true autorestart=true redirect_stderr=true @@ -67,6 +69,7 @@ numprocs=1 [program:queue-worker] process_name=%(program_name)s_%(process_num)02d command=php /app/artisan queue:work database --queue=default --sleep=3 --tries=3 --max-time=3600 +user=www-data autostart=true autorestart=true redirect_stderr=true