diff --git a/packages/cli/src/executors/system/system.helpers.ts b/packages/cli/src/executors/system/system.helpers.ts index ce4bcc66..a4fb69b9 100644 --- a/packages/cli/src/executors/system/system.helpers.ts +++ b/packages/cli/src/executors/system/system.helpers.ts @@ -32,6 +32,7 @@ type EnvKeys = | 'REDIS_PASSWORD' | 'LOCAL_DOMAIN' | 'DEMO_MODE' + | 'GUEST_DASHBOARD' | 'TIPI_GID' | 'TIPI_UID' // eslint-disable-next-line @typescript-eslint/ban-types @@ -178,6 +179,7 @@ export const generateSystemEnvFile = async () => { envMap.set('REDIS_HOST', 'tipi-redis'); envMap.set('REDIS_PASSWORD', redisPassword); envMap.set('DEMO_MODE', String(data.demoMode || 'false')); + envMap.set('GUEST_DASHBOARD', String(data.guestDashboard || 'false')); envMap.set('LOCAL_DOMAIN', data.localDomain || 'tipi.lan'); envMap.set('NODE_ENV', 'production'); diff --git a/packages/shared/src/schemas/env-schemas.ts b/packages/shared/src/schemas/env-schemas.ts index 48ce932e..5e8cee94 100644 --- a/packages/shared/src/schemas/env-schemas.ts +++ b/packages/shared/src/schemas/env-schemas.ts @@ -43,6 +43,14 @@ export const envSchema = z.object({ if (typeof value === 'boolean') return value; return value === 'true'; }), + guestDashboard: z + .string() + .or(z.boolean()) + .optional() + .transform((value) => { + if (typeof value === 'boolean') return value; + return value === 'true'; + }), seePreReleaseVersions: z .string() .or(z.boolean()) @@ -55,5 +63,5 @@ export const envSchema = z.object({ export const settingsSchema = envSchema .partial() - .pick({ dnsIp: true, internalIp: true, appsRepoUrl: true, domain: true, storagePath: true, localDomain: true, demoMode: true }) + .pick({ dnsIp: true, internalIp: true, appsRepoUrl: true, domain: true, storagePath: true, localDomain: true, demoMode: true, guestDashboard: true }) .and(z.object({ port: z.number(), sslPort: z.number(), listenIp: z.string().ip().trim() }).partial());