diff --git a/.github/workflows/frontend-cicd.yml b/.github/workflows/frontend-cicd.yml new file mode 100644 index 0000000..66a6c86 --- /dev/null +++ b/.github/workflows/frontend-cicd.yml @@ -0,0 +1,57 @@ +name: Build and Deploy Frontend to EKS + +on: + push: + branches: [ main ] + paths: + - '**' + - '.github/workflows/frontend-cicd.yml' + +jobs: + build-and-deploy-frontend: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push Docker Image to DockerHub + run: | + docker buildx build \ + --platform linux/amd64 \ + -t ${{ secrets.DOCKERHUB_USERNAME }}/frontend-service:latest \ + --push . + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ap-northeast-2 + + - name: Update kubeconfig for EKS + run: | + aws eks update-kubeconfig \ + --region ap-northeast-2 \ + --name nsmm-eks + + - name: Replace Image Tag in deployment.yaml + run: | + sed -i "s|image: .*frontend-service.*|image: ${{ secrets.DOCKERHUB_USERNAME }}/frontend-service:latest|g" deployment.yaml + + - name: Deploy to EKS + run: | + kubectl apply -f deployment.yaml + + - name: Verify Deployment + run: | + kubectl rollout status deployment/frontend-service diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1020d57 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,57 @@ +name: Build and Deploy Frontend to EKS + +on: + push: + branches: [ main ] + paths: + - 'frontend/**' + - '.github/workflows/frontend-cicd.yml' + +jobs: + build-and-deploy-frontend: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push Docker Image to DockerHub + run: | + docker buildx build \ + --platform linux/amd64 \ + -t ${{ secrets.DOCKERHUB_USERNAME }}/frontend-service:latest \ + --push ./frontend + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ap-northeast-2 + + - name: Update kubeconfig for EKS + run: | + aws eks update-kubeconfig \ + --region ap-northeast-2 \ + --name nsmm-eks + + - name: Replace Image Tag in frontend/deployment.yaml + run: | + sed -i "s|image: .*frontend-service.*|image: ${{ secrets.DOCKERHUB_USERNAME }}/frontend-service:latest|g" frontend/deployment.yaml + + - name: Deploy frontend to EKS + run: | + kubectl apply -f frontend/deployment.yaml + + - name: Verify Deployment + run: | + kubectl rollout status deployment/frontend-service diff --git a/deployment.yaml b/deployment.yaml index 0fde9de..f36a88f 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -12,11 +12,6 @@ spec: labels: app: frontend-service spec: - tolerations: - - key: "eks.amazonaws.com/compute-type" - operator: "Equal" - value: "fargate" - effect: "NoSchedule" containers: - name: frontend-service image: kdonghwan/frontend-service:latest diff --git a/src/services/partnerCompany.ts b/src/services/partnerCompany.ts index c485070..68eca92 100644 --- a/src/services/partnerCompany.ts +++ b/src/services/partnerCompany.ts @@ -12,7 +12,7 @@ export interface PartnerCompany { stock_code?: string // 주식 코드 contract_start_date?: string // 계약 시작일 (API 응답 필드 - YYYY-MM-DD 문자열) modify_date?: string // 수정일 - // 프론트엔드에서 사용할 필드 (API 응답을 변환하여 채움) + // 프론트엔드에서 사용할 필드 (API 응답을 변환하여 채움)............... companyName: string contractStartDate: Date }