From 0f652b4f7405cc461aa3b01f1946b205cc209f56 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Mon, 27 Jan 2020 02:55:03 +0000 Subject: [PATCH 1/2] fix: allow endpoint to be configurable Recently a new feature ws introduced to allow passing the configuration values through environment variables only this didn't cover the `endpoint`-config this PR adds supports for defining the S3 Endpoint in the environment variables. --- plugins/aws-s3-storage/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/aws-s3-storage/src/index.ts b/plugins/aws-s3-storage/src/index.ts index 4db41b68..98273a92 100644 --- a/plugins/aws-s3-storage/src/index.ts +++ b/plugins/aws-s3-storage/src/index.ts @@ -37,6 +37,7 @@ export default class S3Database implements IPluginStorage { this.config.bucket = setConfigValue(this.config.bucket); this.config.keyPrefix = setConfigValue(this.config.keyPrefix); + this.config.endpoint = setConfigValue(this.config.endpoint); this.config.region = setConfigValue(this.config.region); this.config.accessKeyId = setConfigValue(this.config.accessKeyId); this.config.secretAccessKey = setConfigValue(this.config.secretAccessKey); From 8abea85e467acf8f5369dcbc6676b6b4abd98d24 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Mon, 27 Jan 2020 15:50:46 +0000 Subject: [PATCH 2/2] docs: Updated README.md Added call out that `endpoint` is also supported for the environment variables --- plugins/aws-s3-storage/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/aws-s3-storage/README.md b/plugins/aws-s3-storage/README.md index 9c404aef..a0338032 100644 --- a/plugins/aws-s3-storage/README.md +++ b/plugins/aws-s3-storage/README.md @@ -56,6 +56,7 @@ The configured values can either be the actual value or the name of an environme - `bucket` - `keyPrefix` - `region` +- `endpoint` - `accessKeyID` - `secretAccessKey` @@ -64,6 +65,7 @@ store: aws-s3-storage: bucket: S3_BUCKET # If an environment variable named S3_BUCKET is set, it will use that value. Otherwise assumes the bucket is named 'S3_BUCKET' keyPrefix: S3_KEY_PREFIX # If an environment variable named S3_KEY_PREFIX is set, it will use that value. Otherwise assumes the bucket is named 'S3_KEY_PREFIX' + endpoint: S3_ENDPOINT # If an environment variable named S3_ENDPOINT is set, it will use that value. Otherwise assumes the bucket is named 'S3_ENDPOINT' ... ```