From 6004bcf66dbf80591cbe88480cbd3d351b708f58 Mon Sep 17 00:00:00 2001 From: gahusb Date: Mon, 27 Apr 2026 15:05:39 +0900 Subject: [PATCH] =?UTF-8?q?fix(deployer):=20git=20pull=20=ED=9B=84=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=86=8C=EC=9C=A0=EA=B6=8C=EC=9D=84=20PUI?= =?UTF-8?q?D:PGID=EB=A1=9C=20=EB=B3=B5=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deployer 컨테이너가 root로 git pull을 실행하면 새 파일이 root:root 소유로 생성되어 다른 컨테이너에서 권한 문제 발생. pull 직후 chown -R로 원래 소유권(bgg8988:users)을 복원. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/deploy.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 3c69fbb..a54fc49 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -45,6 +45,11 @@ cd "$SRC" git fetch --all --prune git pull --ff-only +# ── git pull 후 파일 소유권 복원 (deployer가 root로 실행되므로) ── +DEPLOY_UID="${PUID:-1026}" +DEPLOY_GID="${PGID:-100}" +chown -R "${DEPLOY_UID}:${DEPLOY_GID}" "$SRC" + # ── 릴리즈 백업 (롤백용) ── TAG="$(date +%Y%m%d-%H%M%S)" BACKUP_DIR="$DST/.releases/$TAG"