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
Binary file added .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
6 changes: 4 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
no-cache: true
tags: |
${{ env.IMAGE }}:latest
${{ env.IMAGE }}:${{ github.sha }}
Expand All @@ -45,7 +46,6 @@ jobs:
name: Deploy to Server
needs: docker-build-push
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Deploy via SSH
Expand All @@ -62,4 +62,6 @@ jobs:
-p 8000:8000 \
-e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \
-e OPENAI_MODEL=${{ secrets.OPENAI_MODEL }} \
${{ env.IMAGE }}:latest
${{ env.IMAGE }}:latest

docker image prune -af || true
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

RUN python -m leftovers.domain.recommend.service.train
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
Binary file added leftovers/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from fastapi.responses import JSONResponse
from pydantic import ValidationError

from app.core.response.api_response import fail
from leftovers.core.response.api_response import fail

# 공통 응답 포맷 생성기
def error_response(status: int, message: str, extra: dict = None):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from openai import OpenAI
from app.core.config.config import settings # 환경설정 로더 가져오기
from leftovers.core.config.config import settings # 환경설정 로더 가져오기

_cfg = settings() # settings

Expand Down
Loading