fix: deploy.sh 가 git pull 뒤 새 스크립트로 다시 시작

실행 중인 셸은 옛 deploy.sh 를 읽고 있어서, pull 로 받은 새 단계(init.sql·seed)가 그 회차에 빠졌다 (10/7 배포 때 실제로 발생)
This commit is contained in:
minaChoi committed 2026-10-07 14:29:17 +09:00
1 parent eae44ba176
commit 2fde88df27
1 file changed
+5 -1
+5 -1
View File
@@ -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