Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
刚试了一下最新v4.10.0的fastgpt-plugin的配置,看上去文档描述以及yml文件中变量与fastgpt-plugin 容器的变量不匹配
docker-compose.yml文件显示用下列变量:
environment:
- AUTH_TOKEN=xxxxxx # disable authentication token if you do not set this variable
# 改成 minio 公网地址
- MINIO_HOST=ip:9000
- MINIO_PORT=9000
- MINIO_USE_SSL=false
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
- MINIO_BUCKET=fastgpt-plugins
按此配置后始终提示错误:
[Info] 2025-07-03 11:27:48: Checking bucket: fastgpt-plugins
[Error] 2025-07-03 11:27:48: Failed to initialize S3 server:
{
message: AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1134:18)
at afterConnectMultiple (node:net:1715:7) {
code: 'ECONNREFUSED',
[errors]: [ [Error], [Error] ]
},
stack: 'AggregateError [ECONNREFUSED]: \n' +
' at internalConnectMultiple (node:net:1134:18)\n' +
' at afterConnectMultiple (node:net:1715:7)'
}
后面看了一下fastgpt-plugin的源码,发现变量应该有出入,相关文件env.d.ts/config.ts:
declare namespace NodeJS {
interface ProcessEnv {
MINIO_CUSTOM_ENDPOINT: string;
MINIO_ENDPOINT: string;
MINIO_PORT: string;
MINIO_USE_SSL: string;
MINIO_ACCESS_KEY: string;
MINIO_SECRET_KEY: string;
MINIO_BUCKET: string;
MAX_FILE_SIZE: string;
RETENTION_DAYS: string;
}
}
config.ts
// 默认配置(动态从环境变量读取)
export const defaultFileConfig: FileConfig = {
maxFileSize: process.env.MAX_FILE_SIZE ? parseInt(process.env.MAX_FILE_SIZE) : 20 * 1024 * 1024, // 默认 20MB
retentionDays: process.env.RETENTION_DAYS ? parseInt(process.env.RETENTION_DAYS) : 15, // 默认保留15天
endpoint: process.env.MINIO_ENDPOINT || 'localhost',
port: process.env.MINIO_PORT ? parseInt(process.env.MINIO_PORT) : 9000,
useSSL: process.env.MINIO_USE_SSL === 'true',
accessKey: process.env.MINIO_ACCESS_KEY || 'minioadmin',
secretKey: process.env.MINIO_SECRET_KEY || 'minioadmin',
bucket: process.env.MINIO_BUCKET || 'files'
};
没有看到有变量: MINIO_HOST,参照修改为:MINIO_ENDPOINT,后正常
原因未知,还是yml中写错了
Beta Was this translation helpful? Give feedback.
All reactions