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-compose部署方式 #55

Closed
leochen12-rgb opened this issue Apr 25, 2023 · 15 comments
Closed

docker-compose部署方式 #55

leochen12-rgb opened this issue Apr 25, 2023 · 15 comments

Comments

@leochen12-rgb
Copy link

  - CHAT_OPENAI_API_KEY=xxx
  - CHAT_OPENAI_ACCESS_TOKEN=xxx
这两个是必填项吗,我两个都填写了运行后提示TOKEN有问题,向大佬请教一下如何配置
@hncboy
Copy link
Owner

hncboy commented Apr 25, 2023

填 CHAT_OPENAI_API_KEY 就行,https://platform.openai.com/account/api-keys 这个地方取值

@leochen12-rgb
Copy link
Author

填 CHAT_OPENAI_API_KEY 就行,https://platform.openai.com/account/api-keys 这个地方取值

报错啦
docker-compose日志:
java_gpt | 2023-04-25T10:09:31.528+08:00 WARN 1 --- [nio-3002-exec-1] c.h.c.b.e.RestExceptionTranslator : 鉴权拦截
java_gpt |
java_gpt | cn.dev33.satoken.exception.NotLoginException: 未能读取到有效Token

网页报错:
{"code":401,"data":null,"message":"未提供 token"}

请教大佬这个是我哪里没有配置好才出现这种问题

@hncboy
Copy link
Owner

hncboy commented Apr 25, 2023

没登录,调接口需要登录,需要部署 chatgpt-shuowen

@leochen12-rgb
Copy link
Author

没登录,调接口需要登录,需要部署 chatgpt-shuowen

邮箱smtp怎么配置的,没有找到路径

@hncboy
Copy link
Owner

hncboy commented Apr 25, 2023

这里面的值 https://github.com/hncboy/chatgpt-web-java/blob/main/chatgpt-bootstrap/src/main/resources/application-dev.yaml

没登录,调接口需要登录,需要部署 chatgpt-shuowen

邮箱smtp怎么配置的,没有找到路径

@leochen12-rgb
Copy link
Author

客户端 chatgpt-shuowen
管理端 chatgpt-jiezi
后台 chatgpt-web-java
请教大佬,因为我的aws外区服务器内存有限,能否把接api的服务放在aws上,其他的服务放在国内云服务器上,该如何操作

@hncboy
Copy link
Owner

hncboy commented Apr 25, 2023

客户端 chatgpt-shuowen 管理端 chatgpt-jiezi 后台 chatgpt-web-java 请教大佬,因为我的aws外区服务器内存有限,能否把接api的服务放在aws上,其他的服务放在国内云服务器上,该如何操作

只要网络能通,都可以分开部署。

@leochen12-rgb
Copy link
Author

客户端 chatgpt-shuowen 管理端 chatgpt-jiezi 后台 chatgpt-web-java 请教大佬,因为我的aws外区服务器内存有限,能否把接api的服务放在aws上,其他的服务放在国内云服务器上,该如何操作

只要网络能通,都可以分开部署。

主要是我不知道哪个服务是用来连接api的,然后将它部署在外区服务器上,其他两个服务部署在国内云上,网络上如何配置,请大佬指示一下哈

@hncboy
Copy link
Owner

hncboy commented Apr 25, 2023

chatgpt-web-java 和 mysql 占的内存最大,java 调的 api。chatgpt-shuowen 和 chatgpt-jiezi 只是前端

@leochen12-rgb
Copy link
Author

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Apr 25 13:33:12 CST 2023
There was an unexpected error (type=Not Found, status=404).

docker-compose up启动后http://ip:3002打开会报错,这是什么原因

@hncboy
Copy link
Owner

hncboy commented Apr 25, 2023

这是 Java 项目没有前端页面,这个错误是正常,接口文档地址是 http://localhost:3002/swagger-ui.html

@leochen12-rgb
Copy link
Author

leochen12-rgb commented Apr 25, 2023

这是 Java 项目没有前端页面,这个错误是正常,接口文档地址是 http://localhost:3002/swagger-ui.html

哈哈,我还以为是报错信息。

chatgpt-web-java 我准备单独部署在aws上 (docker-compose启动)
MySQL现有的 在国内云上 (独立的mysql)
chatgpt-shuowen 和 chatgpt-jiezi 也准备部署在国内云上 (pnpm dev启动)
请教大佬,我应该让他们几个相互网络通信

@hncboy
Copy link
Owner

hncboy commented Apr 25, 2023

这是 Java 项目没有前端页面,这个错误是正常,接口文档地址是 http://localhost:3002/swagger-ui.html

哈哈,我还以为是报错信息。

chatgpt-web-java 我准备单独部署在aws上 (docker-compose启动) MySQL现有的 在国内云上 (独立的mysql) chatgpt-shuowen 和 chatgpt-jiezi 也准备部署在国内云上 (pnpm dev启动) 请教大佬,我应该让他们几个相互网络通信

有公网地址就可以。

@dqzboy
Copy link

dqzboy commented Apr 29, 2023

大佬,邮箱可以在docker-compose.yml通过环境变量的方式设置吗?

@hncboy
Copy link
Owner

hncboy commented May 1, 2023

大佬,邮箱可以在docker-compose.yml通过环境变量的方式设置吗?

可以的

@hncboy hncboy closed this as completed May 4, 2023
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

3 participants