Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker容器内 Mirai 8080端口连接失败 #12

Closed
tomomuy opened this issue Dec 8, 2022 · 5 comments
Closed

docker容器内 Mirai 8080端口连接失败 #12

tomomuy opened this issue Dec 8, 2022 · 5 comments

Comments

@tomomuy
Copy link

tomomuy commented Dec 8, 2022

操作系统:ubuntu20

config.json配置文件:

{
    "mirai": {
        "qq": "qq账号",
        "api_key": "1234567",
        "http_url": "http://localhost:8080",
        "ws_url": "http://localhost:8080"
    },
    "openai": {
        "email": "邮箱",
        "password": "密码"
    },
    "text_to_image": {
        "font_size": 30,
        "width": 700,
        "font_path": "fonts/sarasa-mono-sc-regular.ttf",
        "offset_x": 50,
        "offset_y": 50
    }
}

是不是docker中 api_key 有默认值?

image

@lss233
Copy link
Owner

lss233 commented Dec 8, 2022

ConnectionRefusedError, 应该是端口没打开。
在容器外面 netstat -nltp 看一下?
确定你的 mirai 已经装了 mirai-http-api 插件了嘛?

https://graia.readthedocs.io/ariadne/quickstart/
看一下 看里面关于mirai-api-http 的配置的部分

@tomomuy
Copy link
Author

tomomuy commented Dec 8, 2022

ConnectionRefusedError, 应该是端口没打开。 在容器外面 netstat -nltp 看一下? 确定你的 mirai 已经装了 mirai-http-api 插件了嘛?

https://graia.readthedocs.io/ariadne/quickstart/ 看一下 看里面关于mirai-api-http 的配置的部分

原来容器中没有配置Mirai,需要自己部署吗
我以为容器中环境都已经配置好了,readme文档只要求一个config.json文件

@lss233
Copy link
Owner

lss233 commented Dec 8, 2022

没有嘞。。 这玩意挺玄学的……
有时间搞个吧,或者您来个 PR 也可以~

@lss233
Copy link
Owner

lss233 commented Dec 8, 2022

或者您使用这个项目提供的 docker 也可以: https://github.com/xzsk2/Mirai-Docker
使用 docker-compose 把这俩连接起来就好了。

@tomomuy
Copy link
Author

tomomuy commented Dec 9, 2022

这个不太会😂

@tomomuy tomomuy closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants