services:
  open_notebook_single:
    # image: lfnovo/open_notebook:v1-latest-single
    build:
      context: .
      dockerfile: Dockerfile.single
    ports:
      - "8502:8502"  # Next.js Frontend
      - "5055:5055"  # REST API
    env_file:
      - ./docker.env
    volumes:
      - ./notebook_data:/app/data          # Application data
      - ./surreal_single_data:/mydata      # SurrealDB data
    restart: always
    # Single container includes all services: SurrealDB, API, Worker, and Next.js Frontend
    # Access:
    # - Next.js UI: http://localhost:8502
    # - REST API: http://localhost:5055
    # - API Documentation: http://localhost:5055/docs