Docker with minio

This commit is contained in:
Sean Morley
2024-06-09 18:10:17 +00:00
parent 1c7939f2b8
commit 4ed9ebc456
4 changed files with 49 additions and 5 deletions

View File

@@ -1,11 +1,16 @@
import { Client } from "minio";
import { MINIO_URL } from "$env/static/private";
import { MINIO_ACCESS_KEY } from "$env/static/private";
import { MINIO_SECRET_KEY } from "$env/static/private";
import { MINIO_ENDPOINT } from "$env/static/private";
const port = MINIO_URL?.split(":").pop(); // 9000
const minioClient = new Client({
endPoint: "localhost",
port: 9000,
endPoint: MINIO_ENDPOINT ? MINIO_ENDPOINT : "localhost",
port: port ? parseInt(port) : 9000,
useSSL: false,
accessKey: "minioadmin",
secretKey: "minioadmin",
accessKey: MINIO_ACCESS_KEY,
secretKey: MINIO_SECRET_KEY,
});
export default minioClient;