feat(trade-monitor): Dockerfile + compose 서비스(18715) + .env.example
This commit is contained in:
18
services/trade-monitor/.env.example
Normal file
18
services/trade-monitor/.env.example
Normal file
@@ -0,0 +1,18 @@
|
||||
# Plan-realtime-trade-alerts — trade-monitor
|
||||
|
||||
# NAS Redis (heartbeat)
|
||||
REDIS_URL=redis://192.168.45.54:6379
|
||||
|
||||
# NAS stock 백엔드 (monitor-set / report)
|
||||
NAS_BASE_URL=http://192.168.45.54:18500
|
||||
WEBAI_API_KEY=
|
||||
|
||||
# KIS 자체 토큰 (ai_trade와 분리된 전용 app_key)
|
||||
TM_KIS_APP_KEY=
|
||||
TM_KIS_APP_SECRET=
|
||||
TM_KIS_ACCOUNT=
|
||||
TM_KIS_IS_VIRTUAL=0
|
||||
|
||||
# 루프 주기(초) / sell_climax 거래량 배수 임계
|
||||
TM_LOOP_INTERVAL=60
|
||||
TM_CLIMAX_VOL_MULT=3.0
|
||||
19
services/trade-monitor/Dockerfile
Normal file
19
services/trade-monitor/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM python:3.12-slim-bookworm
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates tzdata \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY trade-monitor/requirements.txt /app/
|
||||
RUN pip install --no-cache-dir --timeout 600 --retries 5 -r requirements.txt
|
||||
|
||||
# 공통 heartbeat 모듈 (services/_shared) — main.py가 from _shared.heartbeat import
|
||||
COPY _shared /app/_shared
|
||||
COPY trade-monitor/. /app/
|
||||
ENV PYTHONPATH=/app
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
|
||||
Reference in New Issue
Block a user