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: