Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/frontend-cicd.yml
Original file line number Diff line number Diff line change
@@ -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
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/services/partnerCompany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down