From 2f36e325afe073669741242b229d4a472a50aeb8 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:59:58 +0700 Subject: [PATCH] chore: update env config --- Prototype/server/.env.example | 5 ++++- Prototype/server/src/storage/index.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Prototype/server/.env.example b/Prototype/server/.env.example index f2f6554..f2eb5d1 100644 --- a/Prototype/server/.env.example +++ b/Prototype/server/.env.example @@ -4,11 +4,14 @@ REALM_URL= PORT= MINIO_HOST=localhost -MINIO_PORT=9000 +MINIO_PORT=443 +MINIO_SSL=true MINIO_ACCESS_KEY= MINIO_SECRET_KEY= +MINIO_BUCKET= ELASTICSEARCH_PROTOCOL=http ELASTICSEARCH_HOST=localhost ELASTICSEARCH_PORT=9200 +ELASTICSEARCH_INDEX= diff --git a/Prototype/server/src/storage/index.ts b/Prototype/server/src/storage/index.ts index ca2a279..48db781 100644 --- a/Prototype/server/src/storage/index.ts +++ b/Prototype/server/src/storage/index.ts @@ -2,8 +2,8 @@ import * as Minio from "minio"; const minioClient = new Minio.Client({ endPoint: process.env.MINIO_HOST ?? "localhost", - port: +(process.env.MINIO_PORT || 9000), - useSSL: false, + port: process.env.MINIO_PORT ? +process.env.MINIO_PORT : undefined, + useSSL: !!process.env.MINIO_SSL, accessKey: process.env.MINIO_ACCESS_KEY ?? "", secretKey: process.env.MINIO_SECRET_KEY ?? "", });