chore: update env config

This commit is contained in:
Methapon2001 2023-11-22 12:59:58 +07:00
parent 4e3366654d
commit 2f36e325af
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
2 changed files with 6 additions and 3 deletions

View file

@ -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=

View file

@ -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 ?? "",
});