From 5f557b2c57f008b704269c07917b8d30e91cd9ef Mon Sep 17 00:00:00 2001 From: hamed <15238-genius.ha@users.noreply.drupalcode.org> Date: Sun, 28 Jun 2026 15:38:10 +0330 Subject: [PATCH] perf(docker): parallel ext compile (MAKEFLAGS=-j) to beat Coolify build timeout Coolify builds with --no-cache, so intl (C++) recompiles from source every deploy (~180s single-threaded) and overran the build timeout (exit 255). Compile across all cores via MAKEFLAGS=-j$(nproc) to cut it several-fold. Co-Authored-By: Claude Opus 4.8 --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 095c4d49..f052e1c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,8 +54,13 @@ FROM php:8.2-fpm-alpine AS runtime # built directly from its GitHub source tarball instead (github.com IS # reachable). pdo_mysql/intl/opcache are bundled with PHP and need no network. # retry() guards the apk/github fetches against transient mirror drops. +# +# intl is C++ and slow to compile; Coolify builds with --no-cache so it recompiles +# every deploy and was overrunning the build timeout (exit 255). Compile in +# parallel across all cores (MAKEFLAGS=-j$(nproc)) to cut that time several-fold. ENV PHPREDIS_VERSION=6.1.0 RUN set -eu; \ + export MAKEFLAGS="-j$(nproc)"; \ retry() { for i in 1 2 3 4 5; do "$@" && return 0; echo "retry $i: $*"; sleep 5; done; return 1; }; \ retry apk add --no-cache nginx supervisor icu-libs \ && retry apk add --no-cache --virtual .build-deps $PHPIZE_DEPS icu-dev \