Skip to content

Commit

Permalink
chore: 배포 완료 후, Second Instance 종료 스크립트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchef1 committed Dec 3, 2024
1 parent efd6eec commit 0a0ba69
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ jobs:
# Build
pnpm build
# Start second instance
pm2 start apps/server/ecosystem.config.js --only harmony-api2 --env production
sleep 5
# Restart first instance
pm2 restart harmony-api --env production || pm2 start apps/server/ecosystem.config.js --env production
pm2 restart apps/server/ecosystem.config.js --env production || pm2 start apps/server/ecosystem.config.js --env production
# Wait for server to start
sleep 5
# Restart second instance
pm2 restart harmony-api2 --env production || pm2 start apps/server/ecosystem.config.js --env production
# Stop second instance
pm2 stop harmony-api2
echo "Deployment Success"

0 comments on commit 0a0ba69

Please sign in to comment.