Skip to content

Commit

Permalink
feat: add env MINIO_SSL #172
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Nov 8, 2023
1 parent 84db4a2 commit 7be0489
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions server/packages/sdk/src/services/lib/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const config = {
storage: {
type: 'minio', // 可选: minio
minioUrl: process.env.MINIO_URL,
ssl: checkEnvTrusty(process.env.MINIO_SSL) ?? false,
user: process.env.MINIO_USER,
pass: process.env.MINIO_PASS,
bucketName: process.env.MINIO_BUCKET_NAME || 'tailchat',
Expand Down
2 changes: 1 addition & 1 deletion server/services/core/file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class FileService extends TcService {
// https://github.com/designtesbrot/moleculer-minio#settings
this.registerSetting('endPoint', endPoint);
this.registerSetting('port', Number(port));
this.registerSetting('useSSL', false);
this.registerSetting('useSSL', config.storage.ssl);
this.registerSetting('accessKey', config.storage.user);
this.registerSetting('secretKey', config.storage.pass);
this.registerSetting('pathStyle', config.storage.pathStyle);
Expand Down
1 change: 1 addition & 0 deletions website/docs/deployment/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ title: Environment Variable
| MINIO_PASS | - | File service password |
| MINIO_BUCKET_NAME | tailchat | file service bucket name |
| MINIO_PATH_STYLE | false | Whether to use path-style s3 communication format, `true` is `Path Style`, `false` is `Virtual hosted style` |
| MINIO_SSL | false | Whether to use SSL to connect storage, if "1" or "true" enable SSL |
| SMTP_SENDER | - | Mail service sender (example: `"Tailchat" example@163.com`) |
| SMTP_URI | - | mail service connection address (example: `smtp://username:password@smtp.example.com/?pool=true`) |
| FILE_LIMIT | 1048576 | File/image upload size limit, the default is 1m, please enter a number(unit: byte) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ title: 环境变量
| MINIO_PASS | - | 文件服务密码 |
| MINIO_BUCKET_NAME | tailchat | 文件服务存储桶名 |
| MINIO_PATH_STYLE | "Path" | 是否使用路径形式的s3通信格式, `Path``Path Style`, `VirtualHosted``Virtual hosted style` |
| MINIO_SSL | false | 是否使用加密连接文件存储服务, 如果为 "1" 或者 "true" 则使用SSL协议 |
| SMTP_SENDER | - | 邮件服务发件人(示例: `"Tailchat" example@163.com`) |
| SMTP_URI | - | 邮件服务连接地址(示例: `smtp://username:password@smtp.example.com/?pool=true`) |
| FILE_LIMIT | 1048576 | 文件/图片上传的大小限制,默认为1m,请输入数字,(单位: 字节) |
Expand Down

0 comments on commit 7be0489

Please sign in to comment.