From d4ddc0d55564aee2e371a305eba02044107981f1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 16:17:11 +0000 Subject: [PATCH] Improve error handling for cache warmup fallback Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> --- Dockerfile | 5 +++-- Dockerfile-frankenphp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 07ea8a6c..2b1b6305 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,8 +39,9 @@ RUN composer dump-autoload RUN mkdir -p var/cache var/log uploads public/media # Generate real translations via cache warmup (needed for webpack build) -RUN echo "yes" | php bin/console cache:warmup --env=prod || \ - (echo "Warning: Cache warmup failed, but continuing..." && \ +RUN echo "yes" | php bin/console cache:warmup --env=prod 2>&1 || \ + (echo "Warning: Cache warmup failed with exit code $?, but continuing..." && \ + echo "Falling back to stub translations..." && \ mkdir -p var/translations && \ echo 'export const messages = {};' > var/translations/index.js && \ echo 'export const localeFallbacks = {};' >> var/translations/index.js) diff --git a/Dockerfile-frankenphp b/Dockerfile-frankenphp index a02e69e8..05fd55c5 100644 --- a/Dockerfile-frankenphp +++ b/Dockerfile-frankenphp @@ -37,8 +37,9 @@ RUN composer dump-autoload RUN mkdir -p var/cache var/log uploads public/media # Generate real translations via cache warmup (needed for webpack build) -RUN echo "yes" | php bin/console cache:warmup --env=prod || \ - (echo "Warning: Cache warmup failed, but continuing..." && \ +RUN echo "yes" | php bin/console cache:warmup --env=prod 2>&1 || \ + (echo "Warning: Cache warmup failed with exit code $?, but continuing..." && \ + echo "Falling back to stub translations..." && \ mkdir -p var/translations && \ echo 'export const messages = {};' > var/translations/index.js && \ echo 'export const localeFallbacks = {};' >> var/translations/index.js)