Files
stock_chart_site/docker-compose.yml
tkrmagid cacddf5adf feat(phase-0): scaffold backend + web + docker + DB schema
- docker-compose.yml: timescaledb-ha (timescaledb 2.27 + vectorscale + pgvector + pgai)
  + backend (FastAPI, CUDA 12.1) + web (Next.js 14)
- docker-compose.gpu.yml: GPU profile overlay for RTX 3070 Ti
- build.bat: Windows bootstrap, auto-detects nvidia-smi and selects GPU/CPU compose
- backend: Dockerfile, pyproject.toml, FastAPI skeleton with /health and /health/db
- DB migration 001_init.sql: symbols (with trigram search), ohlcv_daily/1m (hypertables),
  macro_daily, trading_value_daily, news (vector embedding), predictions
  (with user_triggered flag for on-demand UX), prediction_outcomes, model_performance
- web: Next.js 14 + Tailwind + lightweight-charts placeholder
- README: KIS/DART/HuggingFace token issuance guides + 10 seed tickers + run instructions
2026-05-20 14:37:35 +09:00

63 lines
1.5 KiB
YAML

name: stock_chart_site
services:
db:
image: timescale/timescaledb-ha:pg16
container_name: scs_db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-stock}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-stockpw}
POSTGRES_DB: ${POSTGRES_DB:-stock}
TZ: ${TZ:-Asia/Seoul}
volumes:
- postgres_data:/home/postgres/pgdata/data
- ./backend/app/db/migrations:/docker-entrypoint-initdb.d:ro
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-stock} -d ${POSTGRES_DB:-stock}"]
interval: 10s
timeout: 5s
retries: 10
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: scs_backend
restart: unless-stopped
env_file: .env
environment:
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-stock}:${POSTGRES_PASSWORD:-stockpw}@db:5432/${POSTGRES_DB:-stock}
depends_on:
db:
condition: service_healthy
ports:
- "${BACKEND_PORT:-8000}:8000"
volumes:
- ./backend:/app
- hf_cache:/root/.cache/huggingface
web:
build:
context: ./web
dockerfile: Dockerfile
container_name: scs_web
restart: unless-stopped
env_file: .env
environment:
NEXT_PUBLIC_API_BASE: ${NEXT_PUBLIC_API_BASE:-http://localhost:8000}
depends_on:
- backend
ports:
- "${WEB_PORT:-3000}:3000"
volumes:
- ./web:/app
- /app/node_modules
- /app/.next
volumes:
postgres_data:
hf_cache: