Skip to content

Commit 37dac46

Browse files
committed
infra :: git action 파일 수정 및 dockerfile 수정
1 parent 7a66d83 commit 37dac46

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/GitAction-k8s-deploy.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ jobs:
4040
# Docker 빌드 및 푸시 (GitHub Packages 사용)
4141
- name: Build Docker Image
4242
run: |
43-
docker build --file Dockerfile -t $IMAGE_URI .
43+
docker build \
44+
--file Dockerfile \
45+
--tag $IMAGE_URI \
46+
.
4447
4548
- name: Push Docker Image to GitHub Packages
4649
run: |

Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
# Dockerfile (수정 버전)
12
FROM python:3.11.6
3+
4+
# 1. 의존성 먼저 설치 (레이어 캐싱 최적화)
5+
COPY requirements.txt .
6+
RUN pip install --upgrade pip && \
7+
pip install --no-cache-dir -r requirements.txt
8+
9+
# 2. 소스 코드 복사
210
WORKDIR /app
3-
COPY . /app
4-
RUN pip install -r requirements.txt
11+
COPY . .
12+
13+
# 3. 실행 명령
514
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]

0 commit comments

Comments
 (0)