NAS 기본 설정 변경

This commit is contained in:
2026-03-21 10:45:31 +09:00
parent 14236f355a
commit 7ab0733400
4 changed files with 44 additions and 17 deletions

View File

@@ -44,21 +44,7 @@ rsync -a --delete \
bash "$SRC/scripts/deploy-nas.sh"
cd "$DST"
docker-compose up -d --build backend travel-proxy stock-lab frontend
# [Permission Fix]
# deployer가 root로 돌면서 생성한 파일들의 소유권을 호스트 사용자로 변경
# .env에 정의된 PUID:PGID가 있으면 사용, 없으면 1000:1000
TARGET_UID=$(grep PUID .env | cut -d '=' -f2 || echo 1000)
TARGET_GID=$(grep PGID .env | cut -d '=' -f2 || echo 1000)
echo "Fixing permissions to $TARGET_UID:$TARGET_GID ..."
chown -R "$TARGET_UID:$TARGET_GID" "$DST" || true
chmod -R 755 "$DST" || true
# Repo 쪽도 혹시 모르니
if [ "$SRC" != "$DST" ]; then
chown -R "$TARGET_UID:$TARGET_GID" "$SRC" || true
chmod -R 755 "$SRC" || true
fi
docker-compose up -d --build backend travel-proxy stock-lab frontend deployer
docker exec lotto-frontend nginx -s reload 2>/dev/null || true
echo "DEPLOY_OK $TAG"