crawlab-team / crawlab-lite

Lite version of Crawlab. 轻量版 Crawlab 爬虫管理平台
BSD 3-Clause "New" or "Revised" License
219 stars 75 forks source link

快速开始部署的项目,无法登录。 #44

Open DeSireFire opened 1 year ago

DeSireFire commented 1 year ago

Bug 描述 image

复现步骤 该 Bug 复现步骤如下

  1. 创建docker-compose.yml文件
  2. 粘贴README里快速启动的docker配置内容
  3. 配置文件内容
    version: '3'
    services:
    master:
    image: zkqiang/crawlab-lite:latest
    container_name: master
    ports:
      - "8081:8080"
    volumes:
      - "./data:/app/data"  # persistent volume

    4.宝塔&腾讯云端口均已经放通 5.使用的是ip+端口的方式访问

期望结果 我想登录进去看看功能

截屏 image image

Super-Brother commented 1 year ago

version: '3' services: master: image: zkqiang/crawlab-lite:latest container_name: master ports:

Windyhe commented 5 months ago

version: '3' services: master: image: zkqiang/crawlab-lite:latest container_name: master ports: - "8080:8080" - "8000:8000" volumes: - "./data:/app/data" # persistent volume 把8000也映射下

如果在部署节点之外的机器上登录,映射8000也没用,会因请求http://localhost:8000/login报错。 前端登录调用了crawlab-ui的request,获取的URL是:

export const getRequestBaseUrl = (): string => {
  return import.meta.env.VITE_APP_API_BASE_URL || 'http://localhost:8000';
};

Ref: https://github.com/crawlab-team/crawlab-ui/blob/main/src/utils/request.ts

tikazyq commented 5 months ago

建议转移到 https://github.com/crawlab-team/crawlab 的issue区