Fix Minio Environment Variable

This commit is contained in:
Thomas Rogers 2024-10-31 00:16:36 +01:00
parent 60303ff4e5
commit bb7b3c985b
4 changed files with 4 additions and 6 deletions

View file

@ -20,11 +20,6 @@ export class S3StorageClient implements StorageClient {
this.s3Client = new S3Client({
forcePathStyle: true,
endpoint: urlOverride,
region: 'us-east-1',
credentials: {
accessKeyId: 'minio',
secretAccessKey: 'miniominio',
},
})
}

View file

@ -3,5 +3,5 @@ import { S3StorageClient } from './S3StorageClient'
import { GcsStorageClient } from './GcsStorageClient'
export const storage = env.fileUpload.useLocalStorage
? new S3StorageClient('http://localhost:1010')
? new S3StorageClient(env.fileUpload.localMinioUrl)
: new GcsStorageClient(env.fileUpload?.gcsUploadSAKeyFilePath)

View file

@ -96,6 +96,7 @@ export interface BackendEnv {
gcsUploadPrivateBucket: string
dailyUploadLimit: number
useLocalStorage: boolean
localMinioUrl: string
}
sender: {
message: string
@ -323,6 +324,7 @@ export function getEnv(): BackendEnv {
? parseInt(parse('GCS_UPLOAD_DAILY_LIMIT'), 10)
: 5, // default to 5
useLocalStorage: parse('GCS_USE_LOCAL_HOST') == 'true',
localMinioUrl: parse('LOCAL_MINIO_URL'),
}
const sender = {
message: parse('SENDER_MESSAGE'),

View file

@ -34,6 +34,7 @@ CONTENT_FETCH_QUEUE_ENABLED=true
IMAGE_PROXY_URL=http://localhost:7070 # Need to change this for NGINX
CLIENT_URL=http://localhost:3000 # Need to change this when using NGINX
LOCAL_MINIO_URL=http://localhost:1010
# Redis
REDIS_URL=redis://redis:6379/0