Skip to content

Commit

Permalink
[refactor] #36 - deploy.sh 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hyerinhwang-sailin authored Jan 14, 2025
1 parent 3972d98 commit debc454
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/dev-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,4 @@ jobs:
username: ${{ secrets.DEV_SERVER_USERNAME }}
key: ${{ secrets.DEV_SERVER_KEY }}
script: |
# 2) /home/ubuntu/35-APPJAM-SERVER-NAPZAKMARKET 디렉토리로 이동
cd /home/ubuntu/35-APPJAM-SERVER-NAPZAKMARKET
# 3) .env 파일 작성
echo "REDIS_PASSWORD=${{ secrets.DEV_REDIS_PASSWORD }}" > .env
# 4) docker-compose pull + up
docker-compose -f docker-compose-dev.yml pull
docker-compose -f docker-compose-dev.yml up -d --remove-orphans
# 5) 로그 확인
docker logs napzak-dev
docker logs napzak-dev-redis
# 6) .env 파일 삭제
rm .env
bash /home/ubuntu/35-APPJAM-SERVER-NAPZAKMARKET/deploy.sh
17 changes: 1 addition & 16 deletions .github/workflows/prod-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,4 @@ jobs:
username: ${{ secrets.PROD_SERVER_USERNAME }}
key: ${{ secrets.PROD_SERVER_KEY }}
script: |
# 2) /home/ubuntu/35-APPJAM-SERVER-NAPZAKMARKET 디렉토리로 이동
cd /home/ubuntu/35-APPJAM-SERVER-NAPZAKMARKET
# 3) .env 파일 작성
echo "REDIS_PASSWORD=${{ secrets.PROD_REDIS_PASSWORD }}" > .env
# 4) docker-compose pull + up
docker-compose -f docker-compose-prod.yml pull
docker-compose -f docker-compose-prod.yml up -d --remove-orphans
# 5) 로그 확인
docker logs napzak-prod
docker logs napzak-prod-redis
# 6) .env 파일 삭제
rm .env
bash /home/ubuntu/35-APPJAM-SERVER-NAPZAKMARKET/deploy.sh

0 comments on commit debc454

Please sign in to comment.