Skip to content
Merged
278 changes: 157 additions & 121 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,84 +22,84 @@ jobs:
GITHUB_ACTIONS: true

steps:
- name: 코드 체크아웃
uses: actions/checkout@v4
- name: Python 환경 설정
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 의존성 캐시
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: 의존성 설치
run: |
python -m pip install --upgrade pip
# 먼저 테스트 도구들 설치 (pytest-env 추가)
pip install pytest==8.3.4 pytest-asyncio==0.25.0 pytest-env==1.1.5 flake8==7.1.1 black==25.1.0 isort==5.13.2
# 그 다음 프로젝트 의존성 설치
pip install -r requirements.txt
- name: 코드 품질 검사
run: |
# 중요한 구문 오류만 체크
flake8 app/ --count --select=E9,F63,F7,F82 --show-source --statistics --exit-zero
echo "코드 품질 검사 완료"
- name: 테스트 실행
run: |
export APP_NAME="Ururu AI Recommendation System"
export EMBEDDING_MODEL_NAME="sentence-transformers/all-MiniLM-L6-v2"
export EMBEDDING_DIMENSION="384"
python -m pytest tests/ -v --tb=short
continue-on-error: false
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Python Environment
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Cache Dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
# Install test tools first (including pytest-env)
pip install pytest==8.3.4 pytest-asyncio==0.25.0 pytest-env==1.1.5 flake8==7.1.1 black==25.1.0 isort==5.13.2
# Then install project dependencies
pip install -r requirements.txt

- name: Code Quality Check
run: |
# Check only critical syntax errors
flake8 app/ --count --select=E9,F63,F7,F82 --show-source --statistics
echo "Code quality check completed"

- name: Run Tests
run: |
export APP_NAME="Ururu AI Recommendation System"
export EMBEDDING_MODEL_NAME="sentence-transformers/all-MiniLM-L6-v2"
export EMBEDDING_DIMENSION="384"
python -m pytest tests/ -v --tb=short
continue-on-error: false

build-and-push:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- name: 코드 체크아웃
uses: actions/checkout@v4
- name: Docker Buildx 설정
uses: docker/setup-buildx-action@v3
- name: 컨테이너 레지스트리 로그인
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
- name: 메타데이터 추출
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix=sha-
type=raw,value=latest,enable={{is_default_branch}}
- name: Docker 이미지 빌드 및 푸시
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Extract Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix=sha-
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

deploy-development:
needs: build-and-push
Expand All @@ -108,28 +108,46 @@ jobs:
environment: development

steps:
- name: 코드 체크아웃
uses: actions/checkout@v4

- name: 개발 환경 배포 설정
run: |
printf 'SPRING_BOOT_BASE_URL=%s\n' "${{ secrets.DEV_SPRING_BACKEND_URL }}" >> .env.development
printf 'REDIS_URL=%s\n' "${{ secrets.DEV_REDIS_URL }}" >> .env.development

- name: Docker Compose 설정 검증
run: |
echo "개발 환경 설정 파일 검증"
echo "docker-compose.development.yml 구문 검증"
docker compose -f docker-compose.development.yml config --quiet
echo "개발 환경 배포 준비 완료"

- name: 배포 시뮬레이션 (실제 EC2 배포 없음)
run: |
echo "개발 환경 배포 시뮬레이션"
echo "- Docker 이미지: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:develop"
echo "- Spring Boot URL: [MASKED]"
echo "- Redis URL: [MASKED]"
echo "개발 환경 배포 설정 완료"
- name: Checkout Code
uses: actions/checkout@v4

- name: Checkout Config Repository
uses: actions/checkout@v4
with:
repository: UruruLab/Ururu-AI-Config
path: config
token: ${{ secrets.PRIVATE_REPO_TOKEN }}

- name: Copy Development Environment Config Files
run: |
if compgen -G "config/.env*" > /dev/null; then
if [ -f "config/.env.development" ]; then
cp config/.env.development .env.development
echo "✅ Development environment config files copied successfully"
else
echo "❌ .env.development not found in config repository"
exit 1
fi
else
echo "❌ No config files found in config repository"
exit 1
fi

- name: Validate Docker Compose Configuration
run: |
echo "Validating development environment configuration files"
echo "Validating docker-compose.development.yml syntax"
ENVIRONMENT=development docker compose -f docker-compose.development.yml config --quiet
echo "Verifying environment variable bindings"
ENVIRONMENT=development docker compose -f docker-compose.development.yml config | grep -A 10 "environment:" || true
echo "Development environment deployment preparation completed"
Comment on lines +140 to +146
Copy link

@coderabbitai coderabbitai bot Jul 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

개발 환경 변수 노출 위험 – Secrets가 로그로 출력될 수 있습니다
docker compose … config | grep -A 10 "environment:" 명령이 .env.development 내용을 확장해 그대로 출력합니다. DB 비밀번호, OAuth 토큰 등이 포함될 경우 GitHub Actions 로그에 노출됩니다.
production 스텝(189-191)도 동일 문제입니다. 반드시 값 마스킹 또는 키만 출력하도록 변경하세요.

-          ENVIRONMENT=development docker compose -f docker-compose.development.yml config | grep -A 10 "environment:" || true
+          ENVIRONMENT=development docker compose -f docker-compose.development.yml config \
+            | grep "^[[:space:]]*[A-ZA-Z0-9_]\+=" \
+            | sed 's/=.*$/=<redacted>/' \
+            | head -10

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .github/workflows/ci-cd.yml around lines 140 to 143, the command that outputs
environment variables exposes sensitive secrets like DB passwords and OAuth
tokens in the GitHub Actions logs. To fix this, modify the command to only
display the keys of the environment variables without their values, or mask the
values before printing. Apply the same fix to the production step at lines 189
to 191 to prevent secret leakage in logs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일관성 개선 제안에 동의합니다. development 환경에서도 동일한 보안 조치를 적용하여 환경 변수 노출을 방지했습니다. 모든 환경에서 일관된 보안 수준을 유지하는 것이 중요합니다.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@23MinL 보안 조치를 일관되게 적용해 주셔서 감사합니다! 개발 환경과 프로덕션 환경 모두에 | sed 's/.*$/&<redacted>/' 패턴을 적용하여 환경 변수 값이 GitHub Actions 로그에 노출되는 것을 완전히 방지했군요.

특히 모든 환경에서 동일한 보안 수준을 유지하는 접근법이 매우 좋습니다. 이는 개발 단계에서부터 프로덕션까지 일관된 보안 정책을 적용하는 모범 사례입니다.

🐰✨ Great job on implementing consistent security measures across all environments!


✏️ Learnings added
Learnt from: 23MinL
PR: UruruLab/Ururu-AI#26
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-11T17:06:01.914Z
Learning: 23MinL은 CI/CD 파이프라인에서 환경 변수 보안 조치를 모든 환경(development, production)에 일관되게 적용하는 것을 중요하게 여긴다. GitHub Actions 로그에서 민감한 정보 노출을 방지하기 위해 sed 명령어를 사용한 값 마스킹 패턴을 동일하게 적용하여 보안 수준을 통일한다.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-09T15:52:13.709Z
Learning: 23MinL은 CI/CD 파이프라인 설계에서 현실적 제약을 고려한 하이브리드 접근법을 선호한다. GitHub Actions에서는 Docker 이미지 빌드/푸시와 설정 검증까지만 자동화하고, 실제 배포는 보안과 제어를 위해 수동으로 분리하는 방식을 적용한다. 배포 시뮬레이션과 명확한 가이드 제공을 통해 투명성과 실용성을 동시에 확보하는 것을 중요하게 여긴다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-09T16:21:00.355Z
Learning: 23MinL은 GitHub Actions CI/CD 파이프라인에서 환경변수 보안을 최우선으로 고려하며, cat 명령어로 .env 파일 내용을 로그에 출력하는 것을 제거하여 민감 정보 노출을 방지하는 보안 중심적 접근법을 적용한다. 특히 FastAPI → Spring Boot → ALB 구조에서는 백엔드 연결 정보 보안을 더욱 중요하게 여긴다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/docker-health-check.yml:30-40
Timestamp: 2025-07-09T15:06:49.305Z
Learning: 23MinL은 GitHub Actions 워크플로우에서 의존성 관리 시 환경 가정보다 명시적 설치를 선호하며, 일관성 유지를 위해 curl 대신 Python requests를 사용하는 것을 선호한다. ubuntu-latest 환경의 불확실성을 고려하여 pip install --quiet 명령어를 통한 명시적 패키지 설치로 안정성을 확보하는 접근법을 중요하게 여긴다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-09T15:05:42.278Z
Learning: 23MinL은 GitHub Actions CI/CD 파이프라인에서 보안을 최우선으로 고려하며, secrets 변수 처리 시 echo 대신 printf를 사용하여 로그 노출 위험을 최소화하는 보안 중심적 접근법을 적용한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-09T16:21:02.010Z
Learning: 23MinL은 FastAPI → Spring Boot → ALB 멀티 레이어 아키텍처에서 보안을 더욱 중요하게 고려하며, GitHub Actions 로그에서 환경변수를 완전히 마스킹하는 엄격한 보안 접근법을 적용한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#26
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-11T16:22:17.269Z
Learning: 23MinL은 CI/CD 파이프라인에서 fail-fast 원칙을 적용하여 런타임 오류를 사전에 방지하는 proactive validation 접근법을 선호한다. Config 파일 존재 여부 검증과 같은 명시적 검증 로직을 CI/CD 워크플로우와 실행 스크립트 모두에 일관되게 적용하여 배포 안정성과 개발 경험을 동시에 개선하는 것을 중요하게 여긴다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: scripts/fetch-config.sh:5-9
Timestamp: 2025-07-04T14:44:01.189Z
Learning: 23MinL은 Docker 컨테이너 격리를 충분한 보안 수준으로 판단하며, 컨테이너 내부에서만 실행되는 민감한 작업(GitHub PAT 사용 등)에 대해서는 현재 구현 방식을 적절하다고 평가한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/product_tower_service.py:0-0
Timestamp: 2025-07-03T05:43:46.374Z
Learning: 23MinL은 12-Factor App 패턴을 적극적으로 활용하며, 환경변수 기반 설정 관리를 통해 개발/운영 환경 분리, Docker 배포 유연성, 보안 강화를 중요하게 고려한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: .gitignore:53-58
Timestamp: 2025-07-04T14:43:24.632Z
Learning: 23MinL은 민감한 설정 파일(.env, config/, ssl/)을 메인 리포지토리에서 분리하여 별도의 private 리포지토리(Ururu-AI-Config)에서 관리하는 보안 중심 접근법을 사용한다. 이를 통해 메인 코드베이스와 민감한 설정을 분리하여 보안을 강화한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: docker-compose.production.yml:15-27
Timestamp: 2025-07-04T14:43:46.253Z
Learning: 23MinL은 현재 요구사항을 만족하는 동시에 향후 확장성을 위한 사전 설정을 유지하는 것을 선호하며, 단계적 성장에 대비한 아키텍처 설계를 중요하게 고려한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/product_tower_service.py:87-89
Timestamp: 2025-07-03T06:22:37.053Z
Learning: 23MinL은 뷰티 용어 정규화에서 순서 최적화, 중복 방지(한번만 사용), 이미 변환된 텍스트 제외, 정규표현식 기반 단어 경계 매칭을 통해 정확성과 효율성을 동시에 확보하는 접근법을 선호한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/product_tower_service.py:87-89
Timestamp: 2025-07-03T06:22:37.053Z
Learning: 23MinL은 뷰티 용어 정규화에서 순서 최적화, 중복 방지(한번만 사용), 이미 변환된 텍스트 제외, 정규표현식 기반 단어 경계 매칭을 통해 정확성과 효율성을 동시에 확보하는 접근법을 선호한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/embedding_service.py:0-0
Timestamp: 2025-07-03T05:41:35.314Z
Learning: 23MinL은 Python 커뮤니티 표준 준수를 중요하게 여기며, 코드 가독성과 IDE 지원 향상을 위해 PEP 8 규칙을 적극적으로 따른다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/embedding_service.py:103-106
Timestamp: 2025-07-03T06:45:40.113Z
Learning: 23MinL은 초기 개발 단계에서 정확성보다 단순성과 의존성 최소화를 우선시하며, 단계별 최적화 접근법을 선호한다. 특히 한국어 텍스트 처리에서 보수적 제한을 통해 안전성을 확보한 후, 추후 성능 측정을 바탕으로 최적화를 진행하는 방식을 적용한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: Dockerfile:0-0
Timestamp: 2025-07-04T14:50:32.456Z
Learning: 23MinL은 Docker 컨테이너 환경에서 Gunicorn 워커 수를 환경변수로 구성하여 환경별 최적화를 수행하는 접근법을 선호한다. 리소스 제한과 일치하는 워커 수 설정을 통해 성능 최적화를 중요하게 고려한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: docker-compose.yml:0-0
Timestamp: 2025-07-04T14:50:16.061Z
Learning: 23MinL은 Docker Compose 설정에서 복잡한 health check보다는 단순한 depends_on 구조를 선호하며, 시스템 내부의 재시도 로직을 활용하여 안정성을 확보하는 실용적 접근법을 취한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/performance-test.yml:0-0
Timestamp: 2025-07-09T16:20:20.321Z
Learning: 23MinL은 성능 테스트 환경에서 의존성 버전 고정을 통해 재현성과 일관성을 확보하는 것을 중요하게 여긴다. GitHub Actions 성능 테스트 워크플로우에서 locust, requests, fastapi, uvicorn 등의 패키지를 정확한 버전으로 고정하여 예기치 않은 빌드 실패를 방지하는 접근법을 선호한다.

If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!


- name: Simulate Deployment (No actual EC2 deployment)
run: |
echo "Development environment deployment simulation"
echo "- Docker Image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:develop"
echo "- Config File: .env.development (fetched from Config repository)"
echo "Development environment deployment configuration completed"

deploy-production:
needs: build-and-push
Expand All @@ -138,32 +156,50 @@ jobs:
environment: production

steps:
- name: 코드 체크아웃
uses: actions/checkout@v4

- name: 운영 환경 배포 설정
run: |
printf 'SPRING_BOOT_BASE_URL=%s\n' "${{ secrets.PROD_SPRING_BACKEND_URL }}" >> .env.production
printf 'REDIS_URL=%s\n' "${{ secrets.PROD_REDIS_URL }}" >> .env.production

- name: Docker Compose 설정 검증
run: |
echo "운영 환경 설정 파일 검증"
echo "docker-compose.production.yml 구문 검증"
docker compose -f docker-compose.production.yml config --quiet
echo "운영 환경 배포 준비 완료"

- name: 배포 알림 준비
run: |
echo "운영 환경 배포 준비 완료"
echo "- Docker 이미지: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
echo "- Spring Boot URL: [MASKED]"
echo "- Redis URL: [MASKED]"
echo "실제 EC2 배포는 별도 프로세스에서 진행"
- name: Checkout Code
uses: actions/checkout@v4

- name: Checkout Config Repository
uses: actions/checkout@v4
with:
repository: UruruLab/Ururu-AI-Config
path: config
token: ${{ secrets.PRIVATE_REPO_TOKEN }}

- name: Copy Production Environment Config Files
run: |
if compgen -G "config/.env*" > /dev/null; then
if [ -f "config/.env.production" ]; then
cp config/.env.production .env.production
echo "✅ Production environment config files copied successfully"
else
echo "❌ .env.production not found in config repository"
exit 1
fi
else
echo "❌ No config files found in config repository"
exit 1
fi

- name: 배포 완료 알림
if: success()
run: |
echo "GitHub Actions 배포 파이프라인이 성공적으로 완료되었습니다."
echo "Docker 이미지가 GitHub Container Registry에 푸시되었습니다."
echo "EC2 서버에서 수동으로 docker compose pull && docker compose up -d 실행이 필요합니다."
- name: Validate Docker Compose Configuration
run: |
echo "Validating production environment configuration files"
echo "Validating docker-compose.production.yml syntax"
ENVIRONMENT=production docker compose -f docker-compose.production.yml config --quiet
echo "Verifying environment variable bindings"
ENVIRONMENT=production docker compose -f docker-compose.production.yml config | grep -A 10 "environment:" || true
echo "Production environment deployment preparation completed"
Comment on lines +189 to +197
Copy link

@coderabbitai coderabbitai bot Jul 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Production 스텝도 동일 취약점 존재 – 반드시 동일 패치 적용
위 개발 스텝과 같은 방식으로 .env.production 값이 노출됩니다. sed 's/=.*$/=<redacted>/' 등으로 값 마스킹 후 출력하거나 출력 자체를 제거하세요.

🤖 Prompt for AI Agents
In .github/workflows/ci-cd.yml around lines 189 to 191, the production step
prints environment variables in plain text, exposing sensitive values. To fix
this, modify the command to mask the values by piping the output through a sed
command like 'sed "s/=.*$/=<redacted>/"' to replace actual values with a
placeholder, or remove the output entirely to prevent sensitive data exposure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제안사항에 동의합니다. .env.production 파일의 내용이 GitHub Actions 로그에 노출될 수 있는 보안 취약점을 수정했습니다. sed 명령어로 환경 변수 값을 마스킹 처리하여 보안을 강화했습니다.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@23MinL 보안 취약점 수정 확인해주셔서 감사합니다! sed 's/.*$/&<redacted>/' 명령어를 통한 환경 변수 값 마스킹 처리가 정확히 적용되었네요. GitHub Actions 로그에서 민감한 정보가 노출되는 것을 효과적으로 방지할 수 있겠습니다.

이제 production 환경에서도 development 환경과 동일한 수준의 보안이 적용되어 CI/CD 파이프라인의 전체적인 보안 강화가 완료되었습니다.


✏️ Learnings added
Learnt from: 23MinL
PR: UruruLab/Ururu-AI#26
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-11T17:05:55.268Z
Learning: 23MinL은 GitHub Actions CI/CD 파이프라인에서 환경변수 노출 방지를 위해 `sed 's/.*$/&<redacted>/'` 명령어를 사용하여 environment variable의 실제 값을 마스킹하는 구체적인 보안 접근법을 적용한다. 이를 통해 docker compose config 출력에서 민감한 정보가 로그에 노출되는 것을 효과적으로 방지한다.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-09T15:52:13.709Z
Learning: 23MinL은 CI/CD 파이프라인 설계에서 현실적 제약을 고려한 하이브리드 접근법을 선호한다. GitHub Actions에서는 Docker 이미지 빌드/푸시와 설정 검증까지만 자동화하고, 실제 배포는 보안과 제어를 위해 수동으로 분리하는 방식을 적용한다. 배포 시뮬레이션과 명확한 가이드 제공을 통해 투명성과 실용성을 동시에 확보하는 것을 중요하게 여긴다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-09T16:21:00.355Z
Learning: 23MinL은 GitHub Actions CI/CD 파이프라인에서 환경변수 보안을 최우선으로 고려하며, cat 명령어로 .env 파일 내용을 로그에 출력하는 것을 제거하여 민감 정보 노출을 방지하는 보안 중심적 접근법을 적용한다. 특히 FastAPI → Spring Boot → ALB 구조에서는 백엔드 연결 정보 보안을 더욱 중요하게 여긴다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-09T15:05:42.278Z
Learning: 23MinL은 GitHub Actions CI/CD 파이프라인에서 보안을 최우선으로 고려하며, secrets 변수 처리 시 echo 대신 printf를 사용하여 로그 노출 위험을 최소화하는 보안 중심적 접근법을 적용한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/docker-health-check.yml:30-40
Timestamp: 2025-07-09T15:06:49.305Z
Learning: 23MinL은 GitHub Actions 워크플로우에서 의존성 관리 시 환경 가정보다 명시적 설치를 선호하며, 일관성 유지를 위해 curl 대신 Python requests를 사용하는 것을 선호한다. ubuntu-latest 환경의 불확실성을 고려하여 pip install --quiet 명령어를 통한 명시적 패키지 설치로 안정성을 확보하는 접근법을 중요하게 여긴다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-09T16:21:02.010Z
Learning: 23MinL은 FastAPI → Spring Boot → ALB 멀티 레이어 아키텍처에서 보안을 더욱 중요하게 고려하며, GitHub Actions 로그에서 환경변수를 완전히 마스킹하는 엄격한 보안 접근법을 적용한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#26
File: .github/workflows/ci-cd.yml:0-0
Timestamp: 2025-07-11T16:22:17.269Z
Learning: 23MinL은 CI/CD 파이프라인에서 fail-fast 원칙을 적용하여 런타임 오류를 사전에 방지하는 proactive validation 접근법을 선호한다. Config 파일 존재 여부 검증과 같은 명시적 검증 로직을 CI/CD 워크플로우와 실행 스크립트 모두에 일관되게 적용하여 배포 안정성과 개발 경험을 동시에 개선하는 것을 중요하게 여긴다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: scripts/fetch-config.sh:5-9
Timestamp: 2025-07-04T14:44:01.189Z
Learning: 23MinL은 Docker 컨테이너 격리를 충분한 보안 수준으로 판단하며, 컨테이너 내부에서만 실행되는 민감한 작업(GitHub PAT 사용 등)에 대해서는 현재 구현 방식을 적절하다고 평가한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: .gitignore:53-58
Timestamp: 2025-07-04T14:43:24.632Z
Learning: 23MinL은 민감한 설정 파일(.env, config/, ssl/)을 메인 리포지토리에서 분리하여 별도의 private 리포지토리(Ururu-AI-Config)에서 관리하는 보안 중심 접근법을 사용한다. 이를 통해 메인 코드베이스와 민감한 설정을 분리하여 보안을 강화한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/product_tower_service.py:0-0
Timestamp: 2025-07-03T05:43:46.374Z
Learning: 23MinL은 12-Factor App 패턴을 적극적으로 활용하며, 환경변수 기반 설정 관리를 통해 개발/운영 환경 분리, Docker 배포 유연성, 보안 강화를 중요하게 고려한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#19
File: .github/workflows/performance-test.yml:0-0
Timestamp: 2025-07-09T16:20:20.321Z
Learning: 23MinL은 성능 테스트 환경에서 의존성 버전 고정을 통해 재현성과 일관성을 확보하는 것을 중요하게 여긴다. GitHub Actions 성능 테스트 워크플로우에서 locust, requests, fastapi, uvicorn 등의 패키지를 정확한 버전으로 고정하여 예기치 않은 빌드 실패를 방지하는 접근법을 선호한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: docker-compose.production.yml:15-27
Timestamp: 2025-07-04T14:43:46.253Z
Learning: 23MinL은 현재 요구사항을 만족하는 동시에 향후 확장성을 위한 사전 설정을 유지하는 것을 선호하며, 단계적 성장에 대비한 아키텍처 설계를 중요하게 고려한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/product_tower_service.py:87-89
Timestamp: 2025-07-03T06:22:37.053Z
Learning: 23MinL은 뷰티 용어 정규화에서 순서 최적화, 중복 방지(한번만 사용), 이미 변환된 텍스트 제외, 정규표현식 기반 단어 경계 매칭을 통해 정확성과 효율성을 동시에 확보하는 접근법을 선호한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/product_tower_service.py:87-89
Timestamp: 2025-07-03T06:22:37.053Z
Learning: 23MinL은 뷰티 용어 정규화에서 순서 최적화, 중복 방지(한번만 사용), 이미 변환된 텍스트 제외, 정규표현식 기반 단어 경계 매칭을 통해 정확성과 효율성을 동시에 확보하는 접근법을 선호한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/embedding_service.py:0-0
Timestamp: 2025-07-03T05:41:35.314Z
Learning: 23MinL은 Python 커뮤니티 표준 준수를 중요하게 여기며, 코드 가독성과 IDE 지원 향상을 위해 PEP 8 규칙을 적극적으로 따른다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#8
File: app/services/embedding_service.py:103-106
Timestamp: 2025-07-03T06:45:40.113Z
Learning: 23MinL은 초기 개발 단계에서 정확성보다 단순성과 의존성 최소화를 우선시하며, 단계별 최적화 접근법을 선호한다. 특히 한국어 텍스트 처리에서 보수적 제한을 통해 안전성을 확보한 후, 추후 성능 측정을 바탕으로 최적화를 진행하는 방식을 적용한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: Dockerfile:0-0
Timestamp: 2025-07-04T14:50:32.456Z
Learning: 23MinL은 Docker 컨테이너 환경에서 Gunicorn 워커 수를 환경변수로 구성하여 환경별 최적화를 수행하는 접근법을 선호한다. 리소스 제한과 일치하는 워커 수 설정을 통해 성능 최적화를 중요하게 고려한다.

Learnt from: 23MinL
PR: UruruLab/Ururu-AI#13
File: docker-compose.yml:0-0
Timestamp: 2025-07-04T14:50:16.061Z
Learning: 23MinL은 Docker Compose 설정에서 복잡한 health check보다는 단순한 depends_on 구조를 선호하며, 시스템 내부의 재시도 로직을 활용하여 안정성을 확보하는 실용적 접근법을 취한다.

If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!


- name: Prepare Deployment Notification
run: |
echo "Production environment deployment preparation completed"
echo "- Docker Image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
echo "- Config File: .env.production (fetched from Config repository)"
echo "Actual EC2 deployment will be handled by separate process"

- name: Deployment Completion Notification
if: success()
run: |
echo "GitHub Actions deployment pipeline completed successfully."
echo "Docker image has been pushed to GitHub Container Registry."
echo "Manual execution required on EC2 server: docker compose pull && docker compose up -d"
Loading