Skip to content

Commit 3574aad

Browse files
authored
docs: add S3 persistent storage configuration (#36)
1 parent e6cb195 commit 3574aad

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

dify/api/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## 💾 永続化データの保存先をS3に変更する場合の設定
2+
3+
Difyでアップロードされたファイルの保存先をローカル(`/app/api/storage`)からAWS S3に変更する場合は、以下の環境変数を`api.yaml``worker.yaml`に追加して設定を有効化してください。
4+
この設定により、アップロードされたPDFやCSVなどのファイルがS3バケットに保存され、容量や永続性の制限を気にせず運用できます。
5+
ref: https://docs.dify.ai/getting-started/install-self-hosted/environments
6+
7+
8+
## 💾 Configuration for Using S3 as Persistent Storage
9+
10+
To store uploaded files (such as PDFs and CSVs) in AWS S3 instead of the local path (`/app/api/storage`), enable the following environment variables.
11+
This setup allows for scalable and durable file storage without worrying about local disk limitations.
12+
ref: https://docs.dify.ai/getting-started/install-self-hosted/environments
13+
14+
15+
## 💾 使用 S3 作为持久化存储的配置(中文)
16+
17+
若需将上传文件(如 PDF、CSV 等)从本地路径(`/app/api/storage`)迁移到 AWS S3 进行存储,请在 Kubernetes 部署文件(如 `api.yaml`, `worker.yaml`)的 `env:` 部分添加以下环境变量。
18+
通过此配置,您可以将上传文件保存到 S3,实现可扩展和高持久性的文件存储,无需担心本地磁盘容量限制或数据丢失。
19+
如需了解更多环境变量说明,
20+
ref: https://docs.dify.ai/getting-started/install-self-hosted/environments
21+
22+
```
23+
env:
24+
- name: STORAGE_TYPE
25+
value: 's3'
26+
- name: S3_BUCKET_NAME
27+
value: '<your-bucket-name>'
28+
- name: S3_ACCESS_KEY
29+
valueFrom:
30+
secretKeyRef:
31+
name: dify-credentials
32+
key: s3-access-key
33+
- name: S3_SECRET_KEY
34+
valueFrom:
35+
secretKeyRef:
36+
name: dify-credentials
37+
key: s3-secret-key
38+
- name: S3_REGION
39+
value: '<region>'
40+
- name: S3_ENDPOINT
41+
value: https://s3.<region>.amazonaws.com
42+
```

0 commit comments

Comments
 (0)