From 3da50c896731a6c9b3ca94ee72a16b7b4dc5c34c Mon Sep 17 00:00:00 2001 From: Tim Stollberg Date: Sat, 18 Jul 2026 15:34:36 +0700 Subject: [PATCH] fix(docker): create required Laravel runtime dirs before composer install storage/framework/{cache,sessions,views}, storage/logs, and bootstrap/cache are all gitignored with no tracked placeholder, so a fresh checkout (as Coolify does) has none of them. composer install's package:discover post-autoload script writes to bootstrap/cache and failed with "directory must be present and writable" since it simply didn't exist yet. Co-Authored-By: Claude Sonnet 5 --- docker/php/Dockerfile.prod | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/php/Dockerfile.prod b/docker/php/Dockerfile.prod index ad5a373..c65d75d 100644 --- a/docker/php/Dockerfile.prod +++ b/docker/php/Dockerfile.prod @@ -17,7 +17,8 @@ WORKDIR /var/www/html COPY backend/ /var/www/html COPY docker/php/entrypoint.prod.sh /entrypoint.sh -RUN composer install --no-dev --optimize-autoloader --no-interaction \ +RUN mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache \ + && composer install --no-dev --optimize-autoloader --no-interaction \ && chmod +x /entrypoint.sh \ && chown -R www-data:www-data storage bootstrap/cache