yuexdang / DandJourney

a MidJourney Wrapper named DandJourney, For Discord 、wechat 、Flask app 、etc...
MIT License
77 stars 16 forks source link

试着用docker部署后报错 #8

Closed icymars0815 closed 1 year ago

icymars0815 commented 1 year ago

Error in ResponseCheck: Msg:{"message": "Unknown Integration", "code": 10005},Code:400 Error! Msg:{"message": "Unknown Integration", "code": 10005},Code:400

试着将项目下载下来后将配置写入到config.py中,建立dockerfile后拉起,/dhelp /dabout能输出,但是其他指令会报错,求大佬解惑! 端口用的8080映射到8900,因为原本的8080被占用了;dockerfile放在下面,感觉如果这个调试好了以后可以直接用docker方便一点:

FROM python:3.9-slim-buster

WORKDIR /ddj

COPY requirements.txt . #复制 requirements.txt 文件到容器中

RUN pip install --no-cache-dir -r requirements.txt # 安装依赖包

COPY . . # 将所有文件复制到容器中

CMD ["python", "main.py"] # 运行 main.py

yuexdang commented 1 year ago

Error in ResponseCheck: Msg:{"message": "Unknown Integration", "code": 10005},Code:400 Error! Msg:{"message": "Unknown Integration", "code": 10005},Code:400

试着将项目下载下来后将配置写入到config.py中,建立dockerfile后拉起,/dhelp /dabout能输出,但是其他指令会报错,求大佬解惑! 端口用的8080映射到8900,因为原本的8080被占用了;dockerfile放在下面,感觉如果这个调试好了以后可以直接用docker方便一点:

FROM python:3.9-slim-buster

WORKDIR /ddj

COPY requirements.txt . #复制 requirements.txt 文件到容器中

RUN pip install --no-cache-dir -r requirements.txt # 安装依赖包

COPY . . # 将所有文件复制到容器中

CMD ["python", "main.py"] # 运行 main.py

不是容器化的问题 能补充一下你用的slash command的格式嘛,或者你把指令直接复制过来

icymars0815 commented 1 year ago

额大佬说的slash command指的是discord指令吗?简单来说就是/dhelp /dabout 两个指令均能输出,其他比如/dj 指令会报错,/dsettings 切换relax模式会提示交互失败。

如果指的是其他的请大佬明确下,我去测试一下,感谢指导。

icymars0815 commented 1 year ago

大佬我好像知道为啥了,我没有把midjourney bot拉进同一个服务器......实在是没注意到这个点,说明文档里也没写,十分抱歉。

另外,如果我在docker run 指令后用-e写入环境变量的话是不是也可以?或者通用的办法是用yalm文档进行配置?感觉我可以做一版docker版出来,就当稍微做一些贡献了。