From 2fde88df274e9db69d3e01d6f877c817685f0b23 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Wed, 7 Oct 2026 14:29:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20deploy.sh=20=EA=B0=80=20git=20pull=20?= =?UTF-8?q?=EB=92=A4=20=EC=83=88=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8?= =?UTF-8?q?=EB=A1=9C=20=EB=8B=A4=EC=8B=9C=20=EC=8B=9C=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 실행 중인 셸은 옛 deploy.sh 를 읽고 있어서, pull 로 받은 새 단계(init.sql·seed)가 그 회차에 빠졌다 (10/7 배포 때 실제로 발생) --- deploy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 4cf84f6..1987c04 100755 --- a/deploy.sh +++ b/deploy.sh @@ -10,7 +10,11 @@ cd "$(dirname "$0")" [ -f .env ] || { echo ".env 가 없습니다. .env.example 을 보고 만드세요." >&2; exit 1; } set -a; . ./.env; set +a -git pull --ff-only origin main +# 받은 뒤 새 스크립트로 다시 시작한다 (실행 중인 셸은 옛 내용을 읽고 있어서, 새로 추가된 단계가 그 회차에 빠진다) +if [ -z "${DEPLOY_PULLED:-}" ]; then + git pull --ff-only origin main + DEPLOY_PULLED=1 exec "$0" "$@" +fi docker compose up -d --wait postgres redis docker compose exec -T postgres psql -q -v ON_ERROR_STOP=1 -U "$DB_USER" -d "$DB_NAME" < backend/postgres-init/init.sql docker compose up -d --build backend worker frontend