Merge branch 'main' into develop
This commit is contained in:
commit
b88629abd3
6 changed files with 148 additions and 131 deletions
|
|
@ -27,11 +27,6 @@ const MAIN_MINIO_PORT = process.env.MAIN_MINIO_PORT;
|
|||
const MAIN_MINIO_ACCESS_KEY = getEnvVar("MAIN_MINIO_ACCESS_KEY");
|
||||
const MAIN_MINIO_SECRET_KEY = getEnvVar("MAIN_MINIO_SECRET_KEY");
|
||||
const MAIN_MINIO_BUCKET = getEnvVar("MAIN_MINIO_BUCKET");
|
||||
const BACKUP_MINIO_USE_SSL = getEnvVar("BACKUP_MINIO_USE_SSL");
|
||||
const BACKUP_MINIO_HOST = getEnvVar("BACKUP_MINIO_HOST");
|
||||
const BACKUP_MINIO_PORT = process.env.BACKUP_MINIO_PORT;
|
||||
const BACKUP_MINIO_ACCESS_KEY = getEnvVar("BACKUP_MINIO_ACCESS_KEY");
|
||||
const BACKUP_MINIO_SECRET_KEY = getEnvVar("BACKUP_MINIO_SECRET_KEY");
|
||||
const BACKUP_MINIO_BUCKET = getEnvVar("BACKUP_MINIO_BUCKET");
|
||||
|
||||
function jsonParseOrPlainText(str: string) {
|
||||
|
|
@ -56,9 +51,9 @@ export class BackupController extends Controller {
|
|||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
s3_backup_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_backup_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_backup_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_backup_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_backup_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_backup_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_backup_bucket: BACKUP_MINIO_BUCKET,
|
||||
}),
|
||||
},
|
||||
|
|
@ -142,14 +137,14 @@ export class BackupController extends Controller {
|
|||
s3_source_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_source_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_source_bucket: MAIN_MINIO_BUCKET,
|
||||
s3_dest_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_dest_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_dest_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_dest_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_dest_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_dest_secret: MAIN_MINIO_SECRET_KEY,
|
||||
},
|
||||
database: {
|
||||
s3_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_bucket: BACKUP_MINIO_BUCKET,
|
||||
db_host: DB_HOST,
|
||||
db_port: DB_PORT,
|
||||
|
|
@ -185,14 +180,14 @@ export class BackupController extends Controller {
|
|||
s3_restore_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_restore_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_restore_bucket: MAIN_MINIO_BUCKET,
|
||||
s3_backup_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_backup_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_backup_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_backup_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_backup_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_backup_secret: MAIN_MINIO_SECRET_KEY,
|
||||
},
|
||||
database: {
|
||||
s3_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_bucket: BACKUP_MINIO_BUCKET,
|
||||
db_host: DB_HOST,
|
||||
db_port: DB_PORT,
|
||||
|
|
@ -216,9 +211,9 @@ export class BackupController extends Controller {
|
|||
},
|
||||
body: JSON.stringify({
|
||||
backup_name: body.name,
|
||||
s3_backup_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_backup_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_backup_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_backup_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_backup_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_backup_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_backup_bucket: BACKUP_MINIO_BUCKET,
|
||||
}),
|
||||
},
|
||||
|
|
@ -285,14 +280,14 @@ export class BackupController extends Controller {
|
|||
s3_source_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_source_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_source_bucket: MAIN_MINIO_BUCKET,
|
||||
s3_dest_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_dest_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_dest_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_dest_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_dest_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_dest_secret: MAIN_MINIO_SECRET_KEY,
|
||||
},
|
||||
database: {
|
||||
s3_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_bucket: BACKUP_MINIO_BUCKET,
|
||||
db_host: DB_HOST,
|
||||
db_port: DB_PORT,
|
||||
|
|
@ -336,14 +331,14 @@ export class BackupController extends Controller {
|
|||
s3_source_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_source_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_source_bucket: MAIN_MINIO_BUCKET,
|
||||
s3_dest_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_dest_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_dest_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_dest_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_dest_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_dest_secret: MAIN_MINIO_SECRET_KEY,
|
||||
},
|
||||
database: {
|
||||
s3_endpoint: `${BACKUP_MINIO_USE_SSL === "true" ? "https://" : "http://"}${BACKUP_MINIO_HOST}${(BACKUP_MINIO_PORT && ":" + BACKUP_MINIO_PORT) || ""}`,
|
||||
s3_access: BACKUP_MINIO_ACCESS_KEY,
|
||||
s3_secret: BACKUP_MINIO_SECRET_KEY,
|
||||
s3_endpoint: `${MAIN_MINIO_USE_SSL === "true" ? "https://" : "http://"}${MAIN_MINIO_HOST}${(MAIN_MINIO_PORT && ":" + MAIN_MINIO_PORT) || ""}`,
|
||||
s3_access: MAIN_MINIO_ACCESS_KEY,
|
||||
s3_secret: MAIN_MINIO_SECRET_KEY,
|
||||
s3_bucket: BACKUP_MINIO_BUCKET,
|
||||
db_host: DB_HOST,
|
||||
db_port: DB_PORT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue