LLM-Red-Team/spark-free-api

docker部署不能够部署在非8000端口?部署在9000,服务没起来

Closed this issue · 4 comments

命令如下:
docker run -it -d --init --name spark-free-api -p 9000:9000 -e TZ=Asia/Shanghai vinlic/spark-free-api:latest

日志如下:
===================== LOG START 2024-06-12 09:01:42.575 =====================

[2024-06-12 09:01:42.572][success][index<980,20>] Server initialized
[2024-06-12 09:01:42.576][info][index<1938,18>] <<<< spark free server >>>>
[2024-06-12 09:01:42.576][info][index<1939,18>] Version: 0.0.9
[2024-06-12 09:01:42.577][info][index<1940,18>] Process id: 19
[2024-06-12 09:01:42.577][info][index<1941,18>] Environment: dev
[2024-06-12 09:01:42.577][info][index<1942,18>] Service name: spark-free-api
[2024-06-12 09:01:42.578][info][index<1005,22>] Route attached
[2024-06-12 09:01:42.578][info][index<1005,22>] Route /v1/chat attached
[2024-06-12 09:01:42.579][info][index<1005,22>] Route /v1/images attached
[2024-06-12 09:01:42.579][info][index<1005,22>] Route /token attached
[2024-06-12 09:01:42.579][info][index<1005,22>] Route /ping attached
[2024-06-12 09:01:42.580][info][index<1005,22>] Route /v1 attached
[2024-06-12 09:01:42.583][success][index<1096,20>] Server listening on port 8000 (0.0.0.0)
[2024-06-12 09:01:42.583][success][index<1947,24>] Service startup completed (7ms)

进入到容器,修改/app/configs/dev/service.yaml即可

参数写错了,-p 9000:8000才是正确的映射方式

谢谢