mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: use hex instead of base64 for encryption variables
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
|||||||
type Template,
|
type Template,
|
||||||
type Schema,
|
type Schema,
|
||||||
generateBase64,
|
generateBase64,
|
||||||
|
generatePassword,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
|
|
||||||
export function generate(schema: Schema): Template {
|
export function generate(schema: Schema): Template {
|
||||||
@@ -11,8 +12,8 @@ export function generate(schema: Schema): Template {
|
|||||||
const randomDomain = generateRandomDomain(schema);
|
const randomDomain = generateRandomDomain(schema);
|
||||||
|
|
||||||
const nextAuthSecret = generateBase64(32);
|
const nextAuthSecret = generateBase64(32);
|
||||||
const documensoEncryptionKey = generateBase64(32);
|
const documensoEncryptionKey = generatePassword(32);
|
||||||
const documensoSecondaryEncryptionKey = generateBase64(32);
|
const documensoSecondaryEncryptionKey = generatePassword(64);
|
||||||
|
|
||||||
const envs = [
|
const envs = [
|
||||||
`DOCUMENSO_HOST=${randomDomain}`,
|
`DOCUMENSO_HOST=${randomDomain}`,
|
||||||
@@ -20,7 +21,7 @@ export function generate(schema: Schema): Template {
|
|||||||
`HASH=${mainServiceHash}`,
|
`HASH=${mainServiceHash}`,
|
||||||
`NEXTAUTH_SECRET=${nextAuthSecret}`,
|
`NEXTAUTH_SECRET=${nextAuthSecret}`,
|
||||||
`NEXT_PRIVATE_ENCRYPTION_KEY=${documensoEncryptionKey}`,
|
`NEXT_PRIVATE_ENCRYPTION_KEY=${documensoEncryptionKey}`,
|
||||||
`NEXT_PRIVATE_SECONDARY_ENCRYPTION_KEY=${documensoSecondaryEncryptionKey}`,
|
`NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=${documensoSecondaryEncryptionKey}`,
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user