Skip to content

Commit

Permalink
[ci] 스크립트 수정
Browse files Browse the repository at this point in the history
스크립트 수정
  • Loading branch information
YeaChan05 committed Jul 2, 2024
1 parent 741ff59 commit 6cf77d4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ touch $START_LOG

echo "[$(date +%c)] Docker Compose 실행 시작 - 이미지: $IMAGE_NAME:$IMAGE_TAG" >> $START_LOG

docker-compose -f $DOCKER_COMPOSE_PATH pull
docker-compose -f $DOCKER_COMPOSE_PATH up -d
# docker-compose pull 로그 기록
echo "[$(date +%c)] docker-compose pull 시작" >> $START_LOG
docker-compose -f $DOCKER_COMPOSE_PATH pull >> $START_LOG 2>&1

# docker-compose up 로그 기록
echo "[$(date +%c)] docker-compose up 시작" >> $START_LOG
docker-compose -f $DOCKER_COMPOSE_PATH up -d >> $START_LOG 2>&1

if [ $? -eq 0 ]; then
echo "[$(date +%c)] Docker Compose로 애플리케이션 시작 성공" >> $START_LOG
else
# shellcheck disable=SC2129
echo "[$(date +%c)] Docker Compose로 애플리케이션 시작 실패" >> $START_LOG
echo "[$(date +%c)] Docker Compose 오류 로그:" >> $START_LOG
docker-compose -f $DOCKER_COMPOSE_PATH logs >> $START_LOG 2>&1
fi

# 전체 로그를 기록
echo "[$(date +%c)] 전체 Docker Compose 로그:" >> $START_LOG
docker-compose -f $DOCKER_COMPOSE_PATH logs >> $START_LOG 2>&1

0 comments on commit 6cf77d4

Please sign in to comment.