Skip to content

Commit 05b1745

Browse files
committed
[TEST] Blue-Green 배포 테스트
1 parent 81c1383 commit 05b1745

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/cicd.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ jobs:
7878
run: |
7979
EC2_PUBLIC_IP=$(cat ec2_public_ip.txt)
8080
81-
ssh -o StrictHostKeyChecking=no -i ssh_key.pem ubuntu@$EC2_PUBLIC_IP << 'EOF'
81+
ssh -o StrictHostKeyChecking=no -i ssh_key.pem ubuntu@$EC2_PUBLIC_IP << EOF
82+
#!/bin/bash
8283
8384
echo "🔍 현재 실행 중인 포트 확인"
84-
ACTIVE_PORT=\$(docker ps --format "{{.Ports}}" | grep -oE '808[12]' | head -n 1)
85+
ACTIVE_PORT=$(docker ps --format "{{.Ports}}" | grep -oE '808[12]' | head -n 1)
8586
8687
if [ "\$ACTIVE_PORT" == "8081" ]; then
8788
NEW_PORT=8082
@@ -111,3 +112,4 @@ jobs:
111112
112113
echo "✅ 배포 완료. 현재 활성 컨테이너: spoony-dev-\$NEW_PORT"
113114
EOF
115+

0 commit comments

Comments
 (0)