chore: 누적 미커밋 작업분 일괄 커밋
trading/pipeline/head This commit looks good

이번 세션 외 그간 쌓인 변경 일괄 저장:
- bareunaapi: finance_dict 금융용어 / stock_loader 종목 로더 보강
- kis-api: 키움 토큰·수집 로직
- us-market / dart-collector: 수집 보강
- docker-compose: GEMINI_API_KEY 등 환경변수 추가
- score-engine/news-collector requirements, CLAUDE.md
- 신규: PROJECT.md, news-collector/sentiment_rules.py

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
kyu
2026-06-02 01:24:16 +09:00
parent 8b200e6cc6
commit 97cf5aecb0
11 changed files with 1105 additions and 52 deletions
+38 -5
View File
@@ -54,6 +54,8 @@ services:
BAREUN_API_URL: "http://bareunaapi:5757"
OLLAMA_URL: "http://ollama:11434"
QDRANT_URL: "http://qdrant:6333"
GEMINI_API_KEY: "${GEMINI_API_KEY:-}"
GEMINI_MODEL: "${GEMINI_MODEL:-gemini-2.5-pro}"
TZ: "Asia/Seoul"
networks:
trading-net:
@@ -195,6 +197,8 @@ services:
TELEGRAM_BOT_TOKEN: "${TELEGRAM_BOT_TOKEN:-}"
TELEGRAM_CHAT_ID: "${TELEGRAM_CHAT_ID:-}"
ECOS_API_KEY: "${ECOS_API_KEY:-}"
GEMINI_API_KEY: "${GEMINI_API_KEY:-}"
GEMINI_MODEL: "${GEMINI_MODEL:-gemini-2.5-pro}"
TZ: "Asia/Seoul"
networks:
trading-net:
@@ -510,11 +514,40 @@ services:
networks:
trading-net:
ipv4_address: 172.30.0.9
# ── 메모리 튜닝 (32GB 호스트, 로컬 SSD 기준) ──
# shared_buffers 4GB (컨테이너 limit의 ~67% — Postgres hot cache)
# effective_cache_size 12GB (OS 페이지캐시 포함 추정 가용 캐시)
# work_mem 32MB (단일 sort/hash 메모리. max_conn × 동시쿼리 곱 주의)
# maintenance_work_mem 512MB (VACUUM/CREATE INDEX)
# random_page_cost 1.1 (SSD 비용 모델)
# effective_io_concurrency 200 (SSD)
# parallel_workers 병렬쿼리 활성화 (백테스트/학습용 큰 JOIN에 효과)
# WAL/checkpoint 쓰기 부하 줄이고 회복 시간 살짝 늘림 (적절 균형)
command: >
postgres
-c shared_buffers=4GB
-c effective_cache_size=12GB
-c work_mem=32MB
-c maintenance_work_mem=512MB
-c random_page_cost=1.1
-c effective_io_concurrency=200
-c max_parallel_workers_per_gather=4
-c max_parallel_workers=8
-c max_worker_processes=12
-c checkpoint_timeout=15min
-c max_wal_size=4GB
-c checkpoint_completion_target=0.9
-c wal_compression=on
-c log_min_duration_statement=1000
-c log_checkpoints=on
-c log_temp_files=10MB
-c jit=off
shm_size: 512mb
deploy:
resources:
limits:
cpus: "2.0"
memory: 2G
cpus: "4.0"
memory: 12G
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
@@ -583,7 +616,7 @@ services:
resources:
limits:
cpus: "4.0"
memory: 512M
memory: 1G
healthcheck:
test: ["CMD-SHELL", "true"]
interval: 10s
@@ -655,7 +688,7 @@ services:
resources:
limits:
cpus: "4.0"
memory: 512M
memory: 1G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5757/health"]
interval: 15s
@@ -826,5 +859,5 @@ services:
resources:
limits:
cpus: "4.0"
memory: 512M
memory: 1G
logging: *default-logging