mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add password key
This commit is contained in:
@@ -2,36 +2,21 @@ import {
|
|||||||
type DomainSchema,
|
type DomainSchema,
|
||||||
type Schema,
|
type Schema,
|
||||||
type Template,
|
type Template,
|
||||||
|
generatePassword,
|
||||||
generateRandomDomain,
|
generateRandomDomain,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
|
|
||||||
export function generate(schema: Schema): Template {
|
export function generate(schema: Schema): Template {
|
||||||
const mainDomain = generateRandomDomain(schema);
|
const mainDomain = generateRandomDomain(schema);
|
||||||
|
|
||||||
const apiKey = Array.from({ length: 32 }, () =>
|
const apiKey = generatePassword(32);
|
||||||
Math.floor(Math.random() * 16).toString(16),
|
const encryptionKey = generatePassword(32);
|
||||||
).join("");
|
const jwtSecret = generatePassword(32);
|
||||||
const encryptionKey = Array.from({ length: 32 }, () =>
|
const couchDbPassword = generatePassword(32);
|
||||||
Math.floor(Math.random() * 16).toString(16),
|
const redisPassword = generatePassword(32);
|
||||||
).join("");
|
const minioAccessKey = generatePassword(32);
|
||||||
const jwtSecret = Array.from({ length: 32 }, () =>
|
const minioSecretKey = generatePassword(32);
|
||||||
Math.floor(Math.random() * 16).toString(16),
|
const watchtowerPassword = generatePassword(32);
|
||||||
).join("");
|
|
||||||
const couchDbPassword = Array.from({ length: 32 }, () =>
|
|
||||||
Math.floor(Math.random() * 16).toString(16),
|
|
||||||
).join("");
|
|
||||||
const redisPassword = Array.from({ length: 32 }, () =>
|
|
||||||
Math.floor(Math.random() * 16).toString(16),
|
|
||||||
).join("");
|
|
||||||
const minioAccessKey = Array.from({ length: 32 }, () =>
|
|
||||||
Math.floor(Math.random() * 16).toString(16),
|
|
||||||
).join("");
|
|
||||||
const minioSecretKey = Array.from({ length: 32 }, () =>
|
|
||||||
Math.floor(Math.random() * 16).toString(16),
|
|
||||||
).join("");
|
|
||||||
const watchtowerPassword = Array.from({ length: 32 }, () =>
|
|
||||||
Math.floor(Math.random() * 16).toString(16),
|
|
||||||
).join("");
|
|
||||||
|
|
||||||
const domains: DomainSchema[] = [
|
const domains: DomainSchema[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user