🦺 Allow empty values for DOCKER_PORT

This commit is contained in:
Manuel
2023-09-04 21:33:50 +02:00
parent 27cdd467f5
commit 1651361b7f

View File

@@ -1,7 +1,7 @@
const { z } = require('zod');
const { createEnv } = require('@t3-oss/env-nextjs');
const portSchema = z.string().regex(/\d+/).transform(Number).optional();
const portSchema = z.string().regex(/\d*/).transform((value) => value === undefined ? undefined : Number(Number)).optional();
const envSchema = z.enum(['development', 'test', 'production']);
const env = createEnv({