mirror of https://github.com/msgbyte/tailchat
docs: add docs for external storage
parent
584997826b
commit
d2d6ee5d74
@ -0,0 +1,39 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: External Storage
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
As the usage scale progresses, the user's storage cost for the Tailchat file system will gradually increase, so the privatized deployment of the object storage service `minio` may have high disk storage costs. In order to reduce costs Tailchat provides a solution to use external third-party object storage services
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- The service needs to support `aws s3` storage protocol
|
||||
- `Tailchat` version in `1.8.7+`
|
||||
|
||||
## Config
|
||||
|
||||
You need to configure the environment variables as follows:
|
||||
- `MINIO_URL`: s3 service address
|
||||
- `MINIO_USER`: s3 service username
|
||||
- `MINIO_PASS`: s3 service password
|
||||
- `MINIO_BUCKET_NAME`: s3 service bucket name
|
||||
- `MINIO_PATH_STYLE`: path mode, `VirtualHosted` or `Path`
|
||||
- `STATIC_URL`: The uploaded static path address, which is transferred by the server by default. If you want to directly connect to external storage, you need to change it to an externally accessible address
|
||||
|
||||
> For `aliyunoss`, we can refer to this document for content-related help: https://www.alibabacloud.com/help/en/oss/developer-reference/use-amazon-s3-sdks-to-access-oss
|
||||
|
||||
## Data migration
|
||||
|
||||
If you are migrating from a privately deployed `minio` service to a public cloud, then you need to migrate the old data.
|
||||
|
||||
Migration files: `files/**`
|
||||
|
||||
You can get the trusted content of the storage volume through `docker volume inspect tailchat_storage`, where `Mountpoint` represents the path, package and upload the `<Mountpoint>/tailchat/files` directory to the corresponding
|
||||
|
||||
### Database migration script (optional)
|
||||
|
||||
> This is not a necessary operation, because even if you do not migrate, you will follow the original path to transfer to the server
|
||||
|
||||
TODO: Welcome to co-construction
|
@ -0,0 +1,39 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: 外部存储
|
||||
---
|
||||
|
||||
## 背景
|
||||
|
||||
随着使用规模的推移,用户对 Tailchat 文件系统的存储成本会逐步上升,因此私有化部署的对象存储服务`minio`可能会有很高的磁盘存储成本。为了降低成本 Tailchat 提供了使用外部第三方对象存储服务的解决方案
|
||||
|
||||
## 前提条件
|
||||
|
||||
- 该服务需要支持 `aws s3` 存储协议
|
||||
- `Tailchat` 版本在 `1.8.7+`
|
||||
|
||||
## 配置
|
||||
|
||||
你需要通过环境变量配置如下:
|
||||
- `MINIO_URL`: s3服务地址
|
||||
- `MINIO_USER`: s3服务用户名
|
||||
- `MINIO_PASS`: s3服务密码
|
||||
- `MINIO_BUCKET_NAME`: s3服务 bucket 名
|
||||
- `MINIO_PATH_STYLE`: 路径模式,`VirtualHosted` or `Path`
|
||||
- `STATIC_URL`: 上传后的静态路径地址,默认走服务器中转,如果想要走外部存储直连的话需要改为外部可访问的地址
|
||||
|
||||
> 对于 `aliyunoss` 我们可以参考该文档获得内容相关帮助: https://www.alibabacloud.com/help/en/oss/developer-reference/use-amazon-s3-sdks-to-access-oss
|
||||
|
||||
## 数据迁移
|
||||
|
||||
如果你是从私有化部署的 `minio` 服务迁移到公有云上,那么你需要对旧的数据进行迁移。
|
||||
|
||||
迁移文件: `files/**`
|
||||
|
||||
你可以通过`docker volume inspect tailchat_storage` 获取到存储卷的相信内容,其中 `Mountpoint` 表示路径,把 `<Mountpoint>/tailchat/files` 目录打包上传到对应的
|
||||
|
||||
### 数据库迁移脚本(可选)
|
||||
|
||||
> 这不是一个必须的操作, 因为就算不迁移也会按照原来的路径去走服务器中转
|
||||
|
||||
TODO: 欢迎共建
|
Loading…
Reference in New Issue