From 12fd9d52d9dd199cb0a977b9fc84292b3c285671 Mon Sep 17 00:00:00 2001 From: Mayne0213 Date: Tue, 23 Dec 2025 23:38:10 +0900 Subject: [PATCH] FIX(config): fix Chainlit config dir - Create /root/.chainlit directory in Dockerfile to prevent FileExistsError - Reduce replicas from 2 to 1 to conserve resources - Lower CPU request from 500m to 100m (insufficient CPU on nodes) - Lower memory request from 512Mi to 256Mi - Remove health check probes (Chainlit doesn't have /health endpoint) --- deploy/docker/Dockerfile | 5 ++++- deploy/k8s/base/deployment.yaml | 22 +++++---------------- deploy/k8s/overlays/prod/kustomization.yaml | 2 +- services/backend/requirements.txt | 2 +- 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index 8ae89f6..63b23a2 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -19,7 +19,10 @@ COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # 애플리케이션 코드 복사 -COPY . . +COPY *.py . + +# Chainlit 설정 디렉토리 미리 생성 (권한 문제 해결) +RUN mkdir -p /root/.chainlit # Chainlit 포트 EXPOSE 8000 diff --git a/deploy/k8s/base/deployment.yaml b/deploy/k8s/base/deployment.yaml index 607b550..a6dc9f3 100644 --- a/deploy/k8s/base/deployment.yaml +++ b/deploy/k8s/base/deployment.yaml @@ -6,7 +6,7 @@ metadata: labels: app: mas spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: mas @@ -46,21 +46,9 @@ spec: value: "redis://redis:6379/0" resources: requests: - memory: "512Mi" - cpu: "500m" + memory: "256Mi" + cpu: "100m" limits: - memory: "2Gi" - cpu: "2000m" - livenessProbe: - httpGet: - path: /health - port: 8000 - initialDelaySeconds: 30 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /health - port: 8000 - initialDelaySeconds: 10 - periodSeconds: 5 + memory: "1Gi" + cpu: "1000m" diff --git a/deploy/k8s/overlays/prod/kustomization.yaml b/deploy/k8s/overlays/prod/kustomization.yaml index 54c0bae..b724c0d 100644 --- a/deploy/k8s/overlays/prod/kustomization.yaml +++ b/deploy/k8s/overlays/prod/kustomization.yaml @@ -16,5 +16,5 @@ commonLabels: # 이미지 태그 설정 (ArgoCD Image Updater가 자동으로 업데이트) images: - name: gitea0213.kro.kr/bluemayne/mas - newTag: latest + newTag: main-sha-349c71880a580d01c69d516e13ee1c4d4c02cd08 diff --git a/services/backend/requirements.txt b/services/backend/requirements.txt index 926a78c..0225ba0 100644 --- a/services/backend/requirements.txt +++ b/services/backend/requirements.txt @@ -5,7 +5,7 @@ langchain-anthropic==0.3.0 langchain-openai==0.2.14 langchain-google-genai==2.0.8 -# Chainlit (UI) - installs compatible fastapi and uvicorn +# Chainlit (UI) chainlit==1.3.1 # Pydantic (chainlit compatible)