DroneMind/voicellmcloud/deploy/plane/plane.env.storage-fix.example
2026-04-14 10:08:41 +08:00

23 lines
1.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Plane 自托管:导出/附件下载 404预签名 URL 指向 :8000 而非 MinIO
#
# 原因:官方 apiserver plane/settings/storage.py 在 USE_MINIO=1 时,
# boto3 的 endpoint_url 使用 request.scheme + request.get_host()(即当前 API 地址)。
# 若直接访问 Django 开发端口且未配置 /uploads -> MinIO 反代,链接会打到 Django 并 404。
#
# 做法一(推荐):把 MinIO 当「外部 S3」用预签名 URL 直接指向 MinIO 端口
# 将下列变量合并进你服务器上的 plane.env或 docker .env改 IP/密钥后重启 Plane。
#
USE_MINIO=0
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=access-key
AWS_SECRET_ACCESS_KEY=secret-key
# 浏览器与 API 容器都要能访问到的 MinIO 地址;本机局域网示例:
AWS_S3_ENDPOINT_URL=http://192.168.0.186:9000
# 若 API 在 Docker 内只认服务名,可改为 http://plane-minio:9000但预签名给浏览器时必须用公网/LAN 可达地址,
# 若遇 SignatureDoesNotMatch需保证 endpoint 与浏览器实际访问的主机一致(见 Plane issue #6740
AWS_S3_BUCKET_NAME=uploads
BUCKET_NAME=uploads
# 做法二:保持 USE_MINIO=1在 Nginx/Caddy 上把 /uploads 反代到 MinIO与官方 docker-compose 一致),
# 且用户始终通过同一域名访问 Plane而不是只开 apiserver :8000。