Skip to content

Commit 98beaee

Browse files
committed
πŸš‘οΈ μ΅œμ‹  μ½”λ“œ 반영 μ•ˆλ˜λŠ” 문제 ν•΄κ²°
1 parent 730dfeb commit 98beaee

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

β€Ž.github/workflows/upload_docker_image_to_acr.ymlβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
# 1. μ†ŒμŠ€ μ½”λ“œ 체크아웃
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # λͺ¨λ“  νžˆμŠ€ν† λ¦¬ κ°€μ Έμ˜€κΈ°
20+
ref: ${{ github.ref }} # ν˜„μž¬ 브랜치의 μ΅œμ‹  컀밋 μ‚¬μš©
21+
clean: true # μž‘μ—… 디렉토리 정리
1822

1923
# 2. Azure 둜그인 (Service Principal μ‚¬μš©)
2024
- name: Log in to Azure
@@ -52,6 +56,9 @@ jobs:
5256
push: true # λΉŒλ“œ ν›„ ν‘Έμ‹œ μ‹€ν–‰
5357
tags: ${{ steps.meta.outputs.tags }} # μœ„ metadata stepμ—μ„œ μƒμ„±λœ νƒœκ·Έ μ‚¬μš©
5458
labels: ${{ steps.meta.outputs.labels }} # μœ„ metadata stepμ—μ„œ μƒμ„±λœ 라벨 μ‚¬μš©
59+
no-cache: true # μΊμ‹œ λΉ„ν™œμ„±ν™”
60+
build-args: |
61+
BUILD_DATE=$(date +%Y%m%d%H%M%S) # λΉŒλ“œ μ‹œκ°„μ„ 인자둜 전달
5562
5663
# 6. ACR에 ν‘Έμ‹œλœ 이미지 확인
5764
- name: Verify pushed image

β€ŽDockerfileβ€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ COPY --from=builder /usr/local/bin /usr/local/bin
3333
# Copy application code
3434
COPY . .
3535

36+
# Set build time argument
37+
ARG BUILD_DATE
38+
ENV BUILD_DATE=$BUILD_DATE
39+
3640
# Expose port
3741
EXPOSE 8000
3842

39-
# Command to run the application
40-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
43+
# Command to run the application with --reload option for development
44+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]

0 commit comments

Comments
Β (0)