docs(troubleshooting): rb8001 하드코딩 URL/DB 기본값 환경변수화 정리
This commit is contained in:
parent
7032f4de9e
commit
6eeb25a308
39
troubleshooting/251023_admin_rb8001_URL_환경변수화_정리.md
Normal file
39
troubleshooting/251023_admin_rb8001_URL_환경변수화_정리.md
Normal file
@ -0,0 +1,39 @@
|
||||
# rb8001: 하드코딩 URL/DB 기본값 환경변수화 정리
|
||||
|
||||
**날짜**: 2025-10-23
|
||||
**작성자**: admin
|
||||
**관련 파일**: 아래 목록 참조
|
||||
|
||||
---
|
||||
|
||||
## 문제
|
||||
- RAG 업로드/검색, Tavily, skill-slack/news, DB/Neo4j/Embedding 등 다수의 URL/기본값이 코드에 하드코딩되어 운영 환경 전환에 취약.
|
||||
|
||||
## 조치
|
||||
- 환경변수/Settings 기반으로 통일. 기본값은 localhost 계열로 보수적 설정.
|
||||
|
||||
### 수정 파일
|
||||
- `app/router/slack_handler.py:64, 366` → `SKILL_RAG_FILE_URL` 기반 `/api/upload`, `/api/search`
|
||||
- `app/pipelines/langgraph_document.py:34, 53, 141, 168` → `SKILL_RAG_FILE_URL` 기반 업로드/검색/재색인/텍스트 조회 URL
|
||||
- `app/skills/email_integration.py:366` → LLM 콜백 `http://localhost:{PORT}/api/llm/extract`
|
||||
- `app/commands/skill_commands.py:17,18,347` → `SKILL_SLACK_URL`, `SKILL_NEWS_URL`, `TAVILY_API_URL`
|
||||
- `app/skills/dm_skill.py:362` → `SKILL_NEWS_URL + /api/news/search`
|
||||
- `app/skills/news_posting_skill.py:36` → `DATABASE_URL` 기본값을 localhost로 변경
|
||||
- `app/memory/neo4j_client.py:33` → `NEO4J_URI` 기본값을 localhost로 변경
|
||||
- `app/services/naverworks_file_processor.py:19` → `DATABASE_URL` 기본값 localhost
|
||||
- `app/services/coldmail_filter.py:14` → `DATABASE_URL` 기본값 localhost
|
||||
- `app/services/coldmail_embedding_filter.py:14` → `DATABASE_URL` 기본값 localhost
|
||||
- `app/services/startup_valuation.py:17` → `DATABASE_URL` 기본값 localhost
|
||||
- `app/core/emotion/base.py:16` → `SKILL_EMBEDDING_URL` 기본값 8515로 정정
|
||||
- `app/services/workflows/web_search_workflow.py:79` → `TAVILY_API_URL` 적용
|
||||
- `app/router/message_router.py:140-167` → 웹검색 그래프 경로 도입(환경변수 `WEB_SEARCH_USE_GRAPH`) 및 os import
|
||||
|
||||
## 검증
|
||||
- 단위 테스트 통과: 대명사 해소/출처블록/그래프 워크플로우 (로컬 전용)
|
||||
- 배포 후 헬스체크: `/health` healthy
|
||||
|
||||
## 교훈
|
||||
- URL/엔드포인트는 코드 하드코딩이 아닌 설정으로 관리해야 환경 전환·보안·유지보수가 용이하다.
|
||||
- DB/Neo4j 기본값은 내부 localhost로 설정하고 실환경은 `.env`/compose로 주입.
|
||||
|
||||
---
|
||||
Loading…
x
Reference in New Issue
Block a user