From 93642166752657130755be7b2921645dda07dea2 Mon Sep 17 00:00:00 2001 From: Marton Schneider Date: Sun, 24 Nov 2024 12:50:59 +0100 Subject: [PATCH] optionally can define the endpoint URL for the S3 storage adapter --- app/http.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/http.php b/app/http.php index 9247bcd6..07ade8c4 100644 --- a/app/http.php +++ b/app/http.php @@ -252,8 +252,9 @@ function getStorageDevice(string $root): Device $s3SecretKey = Http::getEnv('OPR_EXECUTOR_STORAGE_S3_SECRET', '') ?? ''; $s3Region = Http::getEnv('OPR_EXECUTOR_STORAGE_S3_REGION', '') ?? ''; $s3Bucket = Http::getEnv('OPR_EXECUTOR_STORAGE_S3_BUCKET', '') ?? ''; + $s3EndpointUrl = Http::getEnv('OPR_EXECUTOR_STORAGE_S3_ENDPOINT', '') ?? ''; $s3Acl = 'private'; - return new S3($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl); + return new S3($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl, $s3EndpointUrl); case Storage::DEVICE_DO_SPACES: $doSpacesAccessKey = Http::getEnv('OPR_EXECUTOR_STORAGE_DO_SPACES_ACCESS_KEY', '') ?? ''; $doSpacesSecretKey = Http::getEnv('OPR_EXECUTOR_STORAGE_DO_SPACES_SECRET', '') ?? '';