Files

178 lines
4.8 KiB
YAML
Raw Permalink Normal View History

# ============================================================
# docker-compose.yml services: 블록 안에 추가
# Phase 1~4 전체 서비스
# ============================================================
# ── Phase 1: 네이버 뉴스 수집기 ──────────────────────────
news-collector:
build:
context: ./news-collector
dockerfile: Dockerfile
container_name: trading-news-collector
restart: unless-stopped
ports:
- "8787:8787"
environment:
REDIS_HOST: redis
REDIS_PASSWORD: "${REDIS_PASSWORD}"
POSTGRES_HOST: "${POSTGRES_HOST}"
POSTGRES_PORT: "${POSTGRES_PORT}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
BAREUN_API_URL: "http://bareunaapi:5757"
OLLAMA_URL: "http://ollama:11434"
VLLM_URL: "http://vllm:8000"
QDRANT_URL: "http://qdrant:6333"
TZ: "Asia/Seoul"
networks:
trading-net:
ipv4_address: 172.30.0.16
depends_on:
redis:
condition: service_healthy
bareunaapi:
condition: service_healthy
deploy:
resources:
limits:
cpus: "2.0"
memory: 2G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8787/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
# ── Phase 2: 한국투자증권 주가 API ──────────────────────
kis-api:
build:
context: ./kis-api
dockerfile: Dockerfile
container_name: trading-kis-api
restart: unless-stopped
ports:
- "8585:8585"
environment:
KIS_APP_KEY: "${KIS_APP_KEY:-}"
KIS_APP_SECRET: "${KIS_APP_SECRET:-}"
KIS_IS_PAPER: "${KIS_IS_PAPER:-true}"
REDIS_HOST: redis
REDIS_PASSWORD: "${REDIS_PASSWORD}"
POSTGRES_HOST: "${POSTGRES_HOST}"
POSTGRES_PORT: "${POSTGRES_PORT}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
TZ: "Asia/Seoul"
networks:
trading-net:
ipv4_address: 172.30.0.18
depends_on:
redis:
condition: service_healthy
deploy:
resources:
limits:
cpus: "2.0"
memory: 1G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8585/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "5"
# ── Phase 3: 종목 점수 엔진 ─────────────────────────────
score-engine:
build:
context: ./score-engine
dockerfile: Dockerfile
container_name: trading-score-engine
restart: unless-stopped
ports:
- "8686:8686"
environment:
REDIS_HOST: redis
REDIS_PASSWORD: "${REDIS_PASSWORD}"
POSTGRES_HOST: "${POSTGRES_HOST}"
POSTGRES_PORT: "${POSTGRES_PORT}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
TZ: "Asia/Seoul"
networks:
trading-net:
ipv4_address: 172.30.0.19
depends_on:
redis:
condition: service_healthy
deploy:
resources:
limits:
cpus: "2.0"
memory: 1G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8686/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "5"
# ── Phase 4: 대시보드 API ───────────────────────────────
dashboard-api:
build:
context: ./dashboard-api
dockerfile: Dockerfile
container_name: trading-dashboard-api
restart: unless-stopped
ports:
- "8989:8989"
environment:
REDIS_HOST: redis
REDIS_PASSWORD: "${REDIS_PASSWORD}"
POSTGRES_HOST: "${POSTGRES_HOST}"
POSTGRES_PORT: "${POSTGRES_PORT}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
TZ: "Asia/Seoul"
networks:
trading-net:
ipv4_address: 172.30.0.22
depends_on:
redis:
condition: service_healthy
deploy:
resources:
limits:
cpus: "2.0"
memory: 1G
healthcheck:
test: ["CMD-SHELL", "true"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "5"