services:
  open_notebook:
    image: lfnovo/open_notebook:v1-latest
    ports:
      - ${PANEL_APP_PORT_HTTP}:8502
      - ${PANEL_APP_PORT_API}:5055
    env_file:
      - ./docker.env
    depends_on:
      - surrealdb
    volumes:
      - ./notebook_data:/app/data
    restart: always
    container_name: ${CONTAINER_NAME}
    networks:
      - 1panel-network
    labels:
      createdBy: Apps
  surrealdb:
    image: surrealdb/surrealdb:v2
    volumes:
      - ./surreal_data:/mydata
    environment:
      - SURREAL_EXPERIMENTAL_GRAPHQL=true
    ports:
      - ${PANEL_APP_PORT_DB}:8000
    command: start --log info --user root --pass root rocksdb:/mydata/mydatabase.db
    pull_policy: always
    user: root
    restart: always
    container_name: ${CONTAINER_NAME}-surrealdb
    networks:
      - 1panel-network
    labels:
      createdBy: Apps
networks:
  1panel-network:
    external: true
