From c089b6b0c57ad7d6f22e6a16ad3bd617536fc6dc Mon Sep 17 00:00:00 2001 From: zzuhannn Date: Thu, 30 Apr 2026 20:30:18 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20FastAPI=20Dockerfile=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 10 ++++++++++ Dockerfile | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2af0ba1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +venv/ +__pycache__/ +*.pyc +.env +.git/ +.github/ +.gitignore +.dockerignore +.omc/ +.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fa10195 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.13-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY app ./app + +EXPOSE 8000 + +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] From 28335ad756c3f2f5d225130a0c45175f5794be9d Mon Sep 17 00:00:00 2001 From: zzuhannn Date: Thu, 30 Apr 2026 20:30:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?ci:=20GitHub=20Actions=20CI=20=EC=9B=8C?= =?UTF-8?q?=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EC=B6=94=EA=B0=80=20(Do?= =?UTF-8?q?cker=20Hub=20=EB=B9=8C=EB=93=9C/=ED=91=B8=EC=8B=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e148177 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + workflow_dispatch: + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +env: + IMAGE: ${{ secrets.DOCKER_USERNAME }}/kkumteul-ai + +jobs: + docker-push: + name: Docker Build & Push + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build & Push image + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ${{ env.IMAGE }}:latest + ${{ env.IMAGE }}:${{ github.sha }}