From ad6c744f2c954f8869a408cdf493d2cc12102842 Mon Sep 17 00:00:00 2001 From: gahusb Date: Sun, 17 May 2026 09:03:20 +0900 Subject: [PATCH] fix(deploy): increase docker/buildkit/pip timeouts for NAS slow build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit webhook 자동 배포가 pip install (pytrends 추가 후 75s+)에서 buildkit context deadline exceeded로 실패하던 이슈 대응. scripts/deploy.sh 상단에 COMPOSE_HTTP_TIMEOUT/DOCKER_CLIENT_TIMEOUT/BUILDKIT_STEP_LOG_MAX_SIZE 10분 환경변수 설정 + insta-lab Dockerfile의 pip install에 --timeout 600 --retries 5 추가. NAS Celeron J4025 환경 영구 대응. --- insta-lab/Dockerfile | 3 ++- scripts/deploy.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/insta-lab/Dockerfile b/insta-lab/Dockerfile index a7ca655..2bdafaf 100644 --- a/insta-lab/Dockerfile +++ b/insta-lab/Dockerfile @@ -16,7 +16,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt +# --timeout 600 --retries 5: NAS 느린 네트워크/CPU에서 pip 다운로드 timeout 방지 +RUN pip install --no-cache-dir --timeout 600 --retries 5 -r requirements.txt RUN playwright install chromium COPY . . diff --git a/scripts/deploy.sh b/scripts/deploy.sh index c00679a..e16a692 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,6 +1,14 @@ #!/bin/bash set -euo pipefail +# ── docker / compose / buildkit timeout 늘리기 ── +# NAS Celeron J4025에서 pip install·chromium 다운로드 등 무거운 RUN step이 +# 기본 timeout(2분)에 걸려 webhook 자동 배포가 "DeadlineExceeded"로 끝나는 일이 +# 있어 10분으로 상향. 호스트 셸 + deployer 컨테이너 둘 다에 적용됨. +export COMPOSE_HTTP_TIMEOUT=600 +export DOCKER_CLIENT_TIMEOUT=600 +export BUILDKIT_STEP_LOG_MAX_SIZE=-1 + # ── 동시 배포 방지 (flock) ── exec 200>/tmp/deploy.lock flock -n 200 || { echo "Deploy already running, skipping"; exit 0; }