mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: avoid using defined secrets in calcom template
This commit is contained in:
parent
85f025c729
commit
f37f98aade
@ -17,8 +17,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
environment:
|
environment:
|
||||||
- NEXTAUTH_SECRET=asklmdaklsmdklasmdklasd
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
||||||
- CALENDSO_ENCRYPTION_KEY=asklmdaklsmdklasmdklasd
|
- CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY}
|
||||||
- DATABASE_URL=postgres://postgres:password@postgres:5432/db
|
- DATABASE_URL=postgres://postgres:password@postgres:5432/db
|
||||||
- NEXT_PUBLIC_WEBAPP_URL=http://${CALCOM_HOST}
|
- NEXT_PUBLIC_WEBAPP_URL=http://${CALCOM_HOST}
|
||||||
- NEXTAUTH_URL=http://${CALCOM_HOST}/api/auth
|
- NEXTAUTH_URL=http://${CALCOM_HOST}/api/auth
|
||||||
|
@ -3,16 +3,22 @@ import {
|
|||||||
generateRandomDomain,
|
generateRandomDomain,
|
||||||
type Template,
|
type Template,
|
||||||
type Schema,
|
type Schema,
|
||||||
|
generateBase64,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
|
|
||||||
// https://cal.com/
|
// https://cal.com/
|
||||||
export function generate(schema: Schema): Template {
|
export function generate(schema: Schema): Template {
|
||||||
const mainServiceHash = generateHash(schema.projectName);
|
const mainServiceHash = generateHash(schema.projectName);
|
||||||
const randomDomain = generateRandomDomain(schema);
|
const randomDomain = generateRandomDomain(schema);
|
||||||
|
const calcomEncryptionKey = generateBase64(32);
|
||||||
|
const nextAuthSecret = generateBase64(32);
|
||||||
|
|
||||||
const envs = [
|
const envs = [
|
||||||
`CALCOM_HOST=${randomDomain}`,
|
`CALCOM_HOST=${randomDomain}`,
|
||||||
"CALCOM_PORT=3000",
|
"CALCOM_PORT=3000",
|
||||||
`HASH=${mainServiceHash}`,
|
`HASH=${mainServiceHash}`,
|
||||||
|
`NEXTAUTH_SECRET=${nextAuthSecret}`,
|
||||||
|
`CALCOM_ENCRYPTION_KEY=${calcomEncryptionKey}`,
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user