TBXark/ChatGPT-Telegram-Workers

[建议] docker部署

Closed this issue · 10 comments

小白求个docker部署

这里有Dockerfile https://github.com/TBXark/ChatGPT-Telegram-Workers/tree/dev/adapter/docker

佬,按照说明走报错呢、esbuild模块已经安装 但还是报这个错误,通过local_v2里的docker部署也是这个报错

root@xx:~/ChatGPT-Telegram-Workers/adapter/docker# yarn && yarn run docker
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 0.78s.
yarn run v1.22.22
$ npm run build && docker build -t chatgpt-telegram-bot:latest .

chatgpt-telegram-bot@1.0.0 build
node esbuild.config.js

node:internal/modules/esm/resolve:844
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /root/ChatGPT-Telegram-Workers/adapter/script/esbuild.config.js
at packageResolve (node:internal/modules/esm/resolve:844:9)
at moduleResolve (node:internal/modules/esm/resolve:901:20)
at defaultResolve (node:internal/modules/esm/resolve:1121:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap. (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.10.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

大佬好人做到底给个docker镜像和教程呗

你试一试这个新的本地部署版本,带有docker教程 https://github.com/TBXark/ChatGPT-Telegram-Workers/tree/dev/adapter/local_v2

你试一试这个新的本地部署版本,带有docker教程 https://github.com/TBXark/ChatGPT-Telegram-Workers/tree/dev/adapter/local_v2

佬 还是一样报错,要不佬直接提供一个Docker Hub的镜像?

chatgpt-telegram-bot@1.0.0 build
node esbuild.config.js

internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /root/ChatGPT-Telegram-Workers/adapter/script/esbuild.config.js
at packageResolve (internal/modules/esm/resolve.js:664:9)
at moduleResolve (internal/modules/esm/resolve.js:705:18)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:798:11)
at Loader.resolve (internal/modules/esm/loader.js:100:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:246:28)
at ModuleWrap. (internal/modules/esm/module_job.js:47:40)
at link (internal/modules/esm/module_job.js:46:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

docker这个好像确实是我少加了esbuild,现在dev分支已经更新了,可以再试一下

docker可以使用gemini且没有kv限额,建议增加docker部署文档

你试一试这个新的本地部署版本,带有docker教程 https://github.com/TBXark/ChatGPT-Telegram-Workers/tree/dev/adapter/local_v2

佬 还是一样报错,要不佬直接提供一个Docker Hub的镜像?

chatgpt-telegram-bot@1.0.0 build
node esbuild.config.js

internal/process/esm_loader.js:74 internalBinding('errors').triggerUncaughtException( ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /root/ChatGPT-Telegram-Workers/adapter/script/esbuild.config.js at packageResolve (internal/modules/esm/resolve.js:664:9) at moduleResolve (internal/modules/esm/resolve.js:705:18) at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:798:11) at Loader.resolve (internal/modules/esm/loader.js:100:40) at Loader.getModuleJob (internal/modules/esm/loader.js:246:28) at ModuleWrap. (internal/modules/esm/module_job.js:47:40) at link (internal/modules/esm/module_job.js:46:36) { code: 'ERR_MODULE_NOT_FOUND' } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

你试试dev分组的最新 docker-compose 启动。因为我的电脑是 apple arm 芯片的。docker交叉编译x86折腾起来太费劲了我就懒得编译发布了。