readme
This commit is contained in:
@@ -39,7 +39,10 @@ export const DEFAULT_SITE_URL = IS_DEVELOPMENT
|
||||
: `https://${ROOT_DOMAIN}`;
|
||||
|
||||
/** MinIO 端点默认主机 */
|
||||
export const DEFAULT_MINIO_HOST = `minioweb.${ROOT_DOMAIN}`;
|
||||
export const DEFAULT_MINIO_HOST = "127.0.0.1";
|
||||
|
||||
/** MinIO 公开访问默认主机 */
|
||||
export const DEFAULT_MINIO_PUBLIC_HOST = `minio.${ROOT_DOMAIN}`;
|
||||
|
||||
/** meetup(目的地)站链接 */
|
||||
export const MEETUP_URL = `https://meetup.${ROOT_DOMAIN}/`;
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
resolvePaymentApiUrl,
|
||||
DEFAULT_POCKETBASE_URL,
|
||||
DEFAULT_MINIO_HOST,
|
||||
DEFAULT_MINIO_PUBLIC_HOST,
|
||||
} from "./domain.config";
|
||||
|
||||
export interface PocketBaseConfig {
|
||||
@@ -113,12 +114,12 @@ export function getPaymentConfig(themeOverride?: { amount?: number; type?: strin
|
||||
/** 获取 MinIO 配置(可传入主题覆盖 bucket/prefix) */
|
||||
export function getMinioConfig(themeOverride?: { bucket?: string; uploadPrefix?: string }): MinioConfig {
|
||||
const endPoint = process.env.MINIO_ENDPOINT || DEFAULT_MINIO_HOST;
|
||||
const port = parseInt(process.env.MINIO_PORT || "9035", 10);
|
||||
const port = parseInt(process.env.MINIO_PORT || "9100", 10);
|
||||
const useSSL = process.env.MINIO_USE_SSL === "true";
|
||||
const bucket = themeOverride?.bucket || process.env.MINIO_BUCKET || "hackrobot";
|
||||
const publicUrl =
|
||||
process.env.MINIO_PUBLIC_URL ||
|
||||
`https://${endPoint}/${bucket}`;
|
||||
`https://${DEFAULT_MINIO_PUBLIC_HOST}/${bucket}`;
|
||||
const uploadPrefix = themeOverride?.uploadPrefix || process.env.MINIO_UPLOAD_PREFIX || "joins";
|
||||
|
||||
return {
|
||||
@@ -127,8 +128,8 @@ export function getMinioConfig(themeOverride?: { bucket?: string; uploadPrefix?:
|
||||
port,
|
||||
useSSL,
|
||||
bucket,
|
||||
accessKey: process.env.MINIO_ACCESS_KEY || "6i56HHfg4zPfYItCZtnp",
|
||||
secretKey: process.env.MINIO_SECRET_KEY || "vDJCqEit3ejH5UmWKAZnvqhziNfbVsoOlBW12G8Q",
|
||||
accessKey: process.env.MINIO_ACCESS_KEY || "nomadro",
|
||||
secretKey: process.env.MINIO_SECRET_KEY || "Xiao4669805@",
|
||||
region: process.env.MINIO_REGION || "china",
|
||||
publicUrl: publicUrl.replace(/\/$/, ""),
|
||||
uploadPrefix,
|
||||
|
||||
Reference in New Issue
Block a user