Browse Source

Merge pull request #9053 from salim-b/patch-1

fix: consider `NC_S3_ENDPOINT` besides `NC_S3_REGION`
develop
Anbarasu 2 days ago committed by GitHub
parent
commit
a039fe0f22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/noco-docs/docs/020.getting-started/050.self-hosted/020.environment-variables.md
  2. 2
      packages/nocodb/src/helpers/NcPluginMgrv2.ts

2
packages/noco-docs/docs/020.getting-started/050.self-hosted/020.environment-variables.md

@ -36,7 +36,7 @@ performance, security, and functionality of NocoDB.
| Variable | Mandatory | Description | If Not Set |
|--------------------------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------|
| `NC_S3_BUCKET_NAME` | No | The name of the AWS S3 bucket used for the S3 storage plugin. | |
| `NC_S3_REGION` | No | The AWS S3 region where the S3 storage plugin bucket is located. | |
| `NC_S3_REGION` | No | The AWS S3 region where the S3 storage plugin bucket is located. Note that `NC_S3_ENDPOINT` takes precedence if set (the endpoint URL includes the region). | |
| `NC_S3_ENDPOINT` | No | S3 endpoint for S3 storage plugin. | Defaults to `s3.<region>.amazonaws.com` |
| `NC_S3_ACCESS_KEY` | No | The AWS access key ID for the S3 storage plugin. Required if no role access in use. | |
| `NC_S3_ACCESS_SECRET` | No | The AWS access secret associated with the S3 storage plugin. Required if no role access in use. | |

2
packages/nocodb/src/helpers/NcPluginMgrv2.ts

@ -132,7 +132,7 @@ class NcPluginMgrv2 {
* NC_S3_REGION
* */
if (process.env.NC_S3_BUCKET_NAME && process.env.NC_S3_REGION) {
if (process.env.NC_S3_BUCKET_NAME && (process.env.NC_S3_REGION || process.env.NC_S3_ENDPOINT)) {
const s3Plugin = await Plugin.getPlugin(S3PluginConfig.id);
const s3CfgData: Record<string, any> = {
bucket: process.env.NC_S3_BUCKET_NAME,

Loading…
Cancel
Save