Improve error handling for cache warmup fallback

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-15 16:17:11 +00:00
parent f9517602bc
commit d4ddc0d555
2 changed files with 6 additions and 4 deletions

View file

@ -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)