File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -125,16 +125,13 @@ jobs:
125125
126126 # 현재 실행 중인 이미지 태그 저장 (롤백용)
127127 echo "💾 Saving current version..."
128- CURRENT_IMAGE=$(docker- compose ps -q nextjs | xargs docker inspect -f '{{.Config.Image}}' 2>/dev/null || echo "none")
128+ CURRENT_IMAGE=$(docker compose ps -q nextjs | xargs docker inspect -f '{{.Config.Image}}' 2>/dev/null || echo "none")
129129 echo "Current: $CURRENT_IMAGE" > ~/deployments/previous-version.txt
130130
131131 # 기존 컨테이너 중지
132132 echo "🛑 Stopping existing containers..."
133- docker- compose down || true
133+ docker compose down || true
134134
135- # PM2 정리(환경 테스트를 하기 위해 사용했던 이전 배포 방식 정리 )
136- pm2 stop global-nomad || true
137- pm2 delete global-nomad || true
138135
139136 # 최신 이미지 pull (정확한 버전)
140137 echo "📥 Pulling image: ${IMAGE_URL}"
@@ -143,7 +140,7 @@ jobs:
143140 # 환경 변수로 이미지 지정하여 실행
144141 echo "🚀 Starting containers..."
145142 export NEXTJS_IMAGE="${IMAGE_URL}"
146- docker- compose up -d
143+ docker compose up -d
147144
148145 # 헬스 체크
149146 echo "❤️ Health check..."
@@ -159,7 +156,7 @@ jobs:
159156 # 최종 확인
160157 if ! curl -f http://localhost:3000 > /dev/null 2>&1; then
161158 echo "❌ Service health check failed after 60 seconds!"
162- docker- compose logs --tail 50 nextjs
159+ docker compose logs --tail 50 nextjs
163160 exit 1
164161 fi
165162
You can’t perform that action at this time.
0 commit comments