Skip to content

Commit

Permalink
MATE-100 : [FEAT] 스크립트 수정 (#91)
Browse files Browse the repository at this point in the history
* MATE-100 : [FIX] 스크립트 수정
-1. 현재 경로가 catchmi-server/catchmi-server로 중복- 이를 해결

* MATE-100 : [FIX] 도커에 환경변수 전달

* MATE-100 : [FIX] develop.yml 수정
- 1. develop 브랜치에 푸시될때 deploy되도록 수정
  • Loading branch information
juchan204 authored Dec 6, 2024
1 parent 1b6fecb commit 0229ad7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Deploy To EC2
on:
push
push:
branches:
- develop

jobs:
deploy:
Expand Down
12 changes: 10 additions & 2 deletions scripts/start-server.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#!/bin/bash

#!/bin/bash
echo "--------------- 서버 배포 시작 -----------------"
docker stop catchmi-server || true
docker rm catchmi-server || true
docker pull 533267244952.dkr.ecr.ap-northeast-2.amazonaws.com/catchmi-server/catchmi-server:latest
docker run -d --name catchmi-server -p 8080:8080 533267244952.dkr.ecr.ap-northeast-2.amazonaws.com/catchmi-server/catchmi-server:latest
docker pull 533267244952.dkr.ecr.ap-northeast-2.amazonaws.com/catchmi-server:latest
docker run -d --name catchmi-server \
-p 8080:8080 \
-e JWT_SECRET_KEY="${JWT_SECRET_KEY}" \
-e NAVER_CLIENT_ID="${NAVER_CLIENT_ID}" \
-e NAVER_REDIRECT_URI="${NAVER_REDIRECT_URI}" \
-e NAVER_CLIENT_SECRET="${NAVER_CLIENT_SECRET}" \
-e OPENWEATHER_API_KEY="${OPENWEATHER_API_KEY}" \
533267244952.dkr.ecr.ap-northeast-2.amazonaws.com/catchmi-server:latest
echo "--------------- 서버 배포 끝 -----------------"

0 comments on commit 0229ad7

Please sign in to comment.