services:
  craft-agents:
    image: ghcr.io/lukilabs/craft-agents-server:0.9.2
    container_name: ${CONTAINER_NAME}
    restart: always
    networks:
      - 1panel-network
    ports:
      - "${PANEL_APP_PORT_HTTP}:9100"
    volumes:
      - craft-agents-data:/home/craftagents/.craft-agent
    environment:
      - TZ=Asia/Shanghai
      - CRAFT_SERVER_TOKEN=${CRAFT_SERVER_TOKEN}
      - CRAFT_RPC_HOST=0.0.0.0
    command:
      - bun
      - run
      - packages/server/src/index.ts
      - --allow-insecure-bind
    labels:
      createdBy: "Apps"
volumes:
  craft-agents-data:
    driver: local
networks:
  1panel-network:
    external: true
