mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix: increase network timeout and retries for external resource fetching during Docker build
- Increase fetch-timeout to 120 seconds (default was likely 30s) - Set retry min/max timeouts to handle transient network issues - Increase fetch-retries to 5 (from default 2) - Add NODE_OPTIONS with increased heap size to prevent OOM during build - Resolves intermittent timeout failures when downloading Google Fonts and other CDN resources
This commit is contained in:
@@ -28,7 +28,14 @@ ARG VITE_API_URL
|
|||||||
ENV VITE_API_URL=${VITE_API_URL}
|
ENV VITE_API_URL=${VITE_API_URL}
|
||||||
COPY --from=installer /app/ .
|
COPY --from=installer /app/ .
|
||||||
COPY --from=pruner /app/out/full/ .
|
COPY --from=pruner /app/out/full/ .
|
||||||
RUN pnpm turbo build --filter="${TURBO_FILTER}..." || \
|
|
||||||
|
# Configure npm/pnpm with extended timeouts and retries for network requests
|
||||||
|
RUN npm config set fetch-timeout 120000 && \
|
||||||
|
npm config set fetch-retry-mintimeout 20000 && \
|
||||||
|
npm config set fetch-retry-maxtimeout 120000 && \
|
||||||
|
npm config set fetch-retries 5
|
||||||
|
|
||||||
|
RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm turbo build --filter="${TURBO_FILTER}..." || \
|
||||||
(echo "Build failed for ${TURBO_FILTER}" && \
|
(echo "Build failed for ${TURBO_FILTER}" && \
|
||||||
ls -la /app/${APP_PATH}/ 2>/dev/null || echo "App path does not exist" && \
|
ls -la /app/${APP_PATH}/ 2>/dev/null || echo "App path does not exist" && \
|
||||||
exit 1)
|
exit 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user