This commit is contained in:
Stephanos A
2026-06-03 07:38:34 +03:00
4 changed files with 32 additions and 3 deletions

View File

@@ -28,7 +28,25 @@ ARG VITE_API_URL
ENV VITE_API_URL=${VITE_API_URL}
COPY --from=installer /app/ .
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}" && \
ls -la /app/${APP_PATH}/ 2>/dev/null || echo "App path does not exist" && \
exit 1)
# Verify build output exists before proceeding
RUN if [ ! -d "/app/${APP_PATH}/dist" ]; then \
echo "ERROR: Build output directory not found at /app/${APP_PATH}/dist"; \
echo "Contents of /app/${APP_PATH}:"; \
ls -la /app/${APP_PATH}/ 2>/dev/null || echo "Directory does not exist"; \
exit 1; \
fi
FROM nginx:alpine AS runner
ARG APP_PATH