mirror of
https://gitee.com/270580156/weiyu.git
synced 2025-12-30 10:52:26 +00:00
update
This commit is contained in:
@@ -124,6 +124,30 @@ services:
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# MinIO 对象存储服务
|
||||
# http://localhost:19000 - MinIO Console
|
||||
# http://localhost:19001 - MinIO API
|
||||
bytedesk-minio:
|
||||
image: minio/minio:latest
|
||||
container_name: minio-bytedesk
|
||||
environment:
|
||||
- MINIO_ROOT_USER=minioadmin
|
||||
- MINIO_ROOT_PASSWORD=minioadmin123
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "19000:9000" # API
|
||||
- "19001:9001" # Console
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
command: minio server /data --console-address ":9001"
|
||||
networks:
|
||||
- bytedesk-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
bytedesk:
|
||||
# image: bytedesk/bytedesk:latest # hub.docker.com enterprise
|
||||
# image: bytedesk/bytedesk-ce:latest # hub.docker.com community
|
||||
@@ -137,6 +161,7 @@ services:
|
||||
- bytedesk-elasticsearch
|
||||
- bytedesk-artemis
|
||||
- bytedesk-zipkin
|
||||
- bytedesk-minio
|
||||
# bytedesk-mysql:
|
||||
# condition: service_healthy
|
||||
# bytedesk-redis:
|
||||
@@ -219,6 +244,14 @@ services:
|
||||
BYTEDESK_UPLOAD_DIR: /app/uploads
|
||||
# 上传文件的访问地址,请修改为服务器实际的地址
|
||||
BYTEDESK_UPLOAD_URL: http://127.0.0.1:9003
|
||||
# MinIO配置(当使用MinIO时)
|
||||
BYTEDESK_MINIO_ENABLED: "false"
|
||||
BYTEDESK_MINIO_ENDPOINT: http://bytedesk-minio:9000 # Docker内部通信使用服务名
|
||||
BYTEDESK_MINIO_ACCESS_KEY: minioadmin
|
||||
BYTEDESK_MINIO_SECRET_KEY: minioadmin123
|
||||
BYTEDESK_MINIO_BUCKET_NAME: bytedesk
|
||||
BYTEDESK_MINIO_REGION: us-east-1
|
||||
BYTEDESK_MINIO_SECURE: false
|
||||
# Knowledge base config
|
||||
BYTEDESK_KBASE_THEME: default
|
||||
BYTEDESK_KBASE_HTML_PATH: helpcenter
|
||||
@@ -473,6 +506,8 @@ volumes:
|
||||
name: bytedesk_artemis_data
|
||||
zipkin_data:
|
||||
name: bytedesk_zipkin_data
|
||||
minio_data:
|
||||
name: bytedesk_minio_data
|
||||
|
||||
networks:
|
||||
bytedesk-network:
|
||||
|
||||
@@ -107,6 +107,30 @@ services:
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# MinIO 对象存储服务
|
||||
# http://localhost:19000 - MinIO Console
|
||||
# http://localhost:19001 - MinIO API
|
||||
bytedesk-minio:
|
||||
image: minio/minio:latest
|
||||
container_name: minio-bytedesk
|
||||
environment:
|
||||
- MINIO_ROOT_USER=minioadmin
|
||||
- MINIO_ROOT_PASSWORD=minioadmin123
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "19000:9000" # API
|
||||
- "19001:9001" # Console
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
command: minio server /data --console-address ":9001"
|
||||
networks:
|
||||
- bytedesk-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
bytedesk:
|
||||
# image: bytedesk/bytedesk:latest # hub.docker.com enterprise
|
||||
# image: bytedesk/bytedesk-ce:latest # hub.docker.com community
|
||||
@@ -119,6 +143,7 @@ services:
|
||||
- bytedesk-elasticsearch
|
||||
- bytedesk-artemis
|
||||
- bytedesk-zipkin
|
||||
- bytedesk-minio
|
||||
# bytedesk-mysql:
|
||||
# condition: service_healthy
|
||||
# bytedesk-redis:
|
||||
@@ -199,6 +224,14 @@ services:
|
||||
BYTEDESK_UPLOAD_DIR: /app/uploads
|
||||
# 上传文件的访问地址,请修改为服务器实际的地址
|
||||
BYTEDESK_UPLOAD_URL: http://127.0.0.1:9003
|
||||
# MinIO配置(当使用MinIO时)
|
||||
BYTEDESK_MINIO_ENABLED: "false"
|
||||
BYTEDESK_MINIO_ENDPOINT: http://bytedesk-minio:9000 # Docker内部通信使用服务名
|
||||
BYTEDESK_MINIO_ACCESS_KEY: minioadmin
|
||||
BYTEDESK_MINIO_SECRET_KEY: minioadmin123
|
||||
BYTEDESK_MINIO_BUCKET_NAME: bytedesk
|
||||
BYTEDESK_MINIO_REGION: us-east-1
|
||||
BYTEDESK_MINIO_SECURE: false
|
||||
# Knowledge base config
|
||||
BYTEDESK_KBASE_THEME: default
|
||||
BYTEDESK_KBASE_HTML_PATH: helpcenter
|
||||
@@ -459,6 +492,8 @@ volumes:
|
||||
name: bytedesk_artemis_data
|
||||
zipkin_data:
|
||||
name: bytedesk_zipkin_data
|
||||
minio_data:
|
||||
name: bytedesk_minio_data
|
||||
|
||||
networks:
|
||||
bytedesk-network:
|
||||
|
||||
@@ -45,6 +45,7 @@ import com.bytedesk.core.rbac.auth.AuthService;
|
||||
import com.bytedesk.core.rbac.user.UserEntity;
|
||||
import com.bytedesk.core.rbac.user.UserProtobuf;
|
||||
import com.bytedesk.core.uid.UidUtils;
|
||||
import com.bytedesk.core.upload.minio.UploadMinioService;
|
||||
import com.bytedesk.core.upload.storage.UploadStorageException;
|
||||
import com.bytedesk.core.upload.storage.UploadStorageFileNotFoundException;
|
||||
import com.bytedesk.core.utils.BdDateUtils;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-03-15 20:24:35
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2024-03-15 20:32:39
|
||||
* @LastEditTime: 2025-07-27 23:24:57
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
@@ -11,7 +11,7 @@
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.upload.cloud;
|
||||
package com.bytedesk.core.upload.aliyun;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.bytedesk.core.upload.cloud;
|
||||
package com.bytedesk.core.upload.aliyun;
|
||||
|
||||
import com.aliyun.oss.OSS;
|
||||
// import com.aliyun.oss.model.PutObjectResult;
|
||||
@@ -11,7 +11,7 @@
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.upload.cloud;
|
||||
package com.bytedesk.core.upload.aliyun;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.upload.cloud;
|
||||
package com.bytedesk.core.upload.minio;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
@@ -11,7 +11,7 @@
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.upload;
|
||||
package com.bytedesk.core.upload.minio;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
@@ -22,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import com.bytedesk.core.upload.UploadRequest;
|
||||
import com.bytedesk.core.upload.UploadRestService;
|
||||
import com.bytedesk.core.utils.JsonResult;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -11,7 +11,7 @@
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.upload;
|
||||
package com.bytedesk.core.upload.minio;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-03-15 20:24:35
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-07-27 23:24:57
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
|
||||
* contact: 270580156@qq.com
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.upload.tencent;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.qcloud.cos.COSClient;
|
||||
import com.qcloud.cos.ClientConfig;
|
||||
import com.qcloud.cos.auth.BasicCOSCredentials;
|
||||
import com.qcloud.cos.auth.COSCredentials;
|
||||
import com.qcloud.cos.region.Region;
|
||||
|
||||
@Configuration
|
||||
public class TencentConfig {
|
||||
|
||||
@Autowired
|
||||
TencentProperties tencentProperties;
|
||||
|
||||
@Bean
|
||||
public COSClient createCOSClient() {
|
||||
COSCredentials credentials = new BasicCOSCredentials(
|
||||
tencentProperties.getSecretId(),
|
||||
tencentProperties.getSecretKey()
|
||||
);
|
||||
ClientConfig clientConfig = new ClientConfig(new Region(tencentProperties.getBucketLocation()));
|
||||
return new COSClient(credentials, clientConfig);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.bytedesk.core.upload.cloud;
|
||||
package com.bytedesk.core.upload.tencent;
|
||||
|
||||
import com.qcloud.cos.COSClient;
|
||||
import com.qcloud.cos.ClientConfig;
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-03-15 20:24:15
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-01-09 23:20:59
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
|
||||
* contact: 270580156@qq.com
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
|
||||
*/
|
||||
package com.bytedesk.core.upload.tencent;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "tencent")
|
||||
public class TencentProperties {
|
||||
|
||||
@Value("${tencent.bucket.location:ap-shanghai}")
|
||||
private String bucketLocation;
|
||||
|
||||
@Value("${tencent.bucket.name:}")
|
||||
private String bucketName;
|
||||
|
||||
@Value("${tencent.bucket.domain:}")
|
||||
private String bucketDomain;
|
||||
|
||||
@Value("${tencent.appid:}")
|
||||
private String appId;
|
||||
|
||||
@Value("${tencent.secretid:}")
|
||||
private String secretId;
|
||||
|
||||
@Value("${tencent.secretkey:}")
|
||||
private String secretKey;
|
||||
|
||||
@Value("${upload.dir.prefix:}")
|
||||
private String uploadDirPrefix;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user