我有一个使用环回的服务器和一个带有minio的存储系统 . Minio被称为“S3兼容”,因此我想使用环回存储组件将minio添加为环回的数据源 .
使用S3,配置看起来像
{ provider: 'amazon', key: '...', keyId: '...' }
但我怎么能告诉它使用minio?
环回存储组件基于 pkgcloud ,它以 endpoint 为参数 . 在datasource.js中,添加
pkgcloud
endpoint
"storage": { "name": "storage", "connector": "loopback-component-storage", "provider": "amazon", "keyId": "accees_key", "key": "secret_key", "forcePathBucket": true, "endpoint": "your_minio.endpoint:9000", "acl": "public-read" }
如果您的存储桶路径看起来像 your_minio.endpoint:9000/bucketPath ,则 forcePathBucket 应该为true .
your_minio.endpoint:9000/bucketPath
forcePathBucket
1 回答
环回存储组件基于
pkgcloud
,它以endpoint
为参数 . 在datasource.js中,添加如果您的存储桶路径看起来像
your_minio.endpoint:9000/bucketPath
,则forcePathBucket
应该为true .