From c602ced66f40d690ed8590f74986359ed4bca5bd Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Fri, 23 Aug 2024 01:09:45 -0400 Subject: [PATCH] fix docker image --- apps/nextjs/Dockerfile | 1 + apps/nextjs/next.config.js | 1 + apps/nextjs/package.json | 2 +- packages/job-dispatch/src/config.ts | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/nextjs/Dockerfile b/apps/nextjs/Dockerfile index b24b88214..a7e8815e5 100644 --- a/apps/nextjs/Dockerfile +++ b/apps/nextjs/Dockerfile @@ -34,6 +34,7 @@ COPY packages/auth/package.json ./packages/auth/package.json COPY packages/db/package.json ./packages/db/package.json COPY packages/validators/package.json ./packages/validators/package.json COPY packages/job-dispatch/package.json ./packages/job-dispatch/package.json +COPY packages/ui/package.json ./packages/ui/package.json COPY apps/nextjs/package.json ./apps/nextjs/package.json diff --git a/apps/nextjs/next.config.js b/apps/nextjs/next.config.js index fb6e12b91..f7a7df2ca 100644 --- a/apps/nextjs/next.config.js +++ b/apps/nextjs/next.config.js @@ -6,6 +6,7 @@ createJiti(fileURLToPath(import.meta.url))("./src/env"); /** @type {import("next").NextConfig} */ const config = { + output: "standalone", reactStrictMode: false, /** Enables hot reloading for local packages without a build step */ diff --git a/apps/nextjs/package.json b/apps/nextjs/package.json index 539f566f9..2f1043605 100644 --- a/apps/nextjs/package.json +++ b/apps/nextjs/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "scripts": { - "build": "pnpm with-env next build", + "build": "SKIP_ENV_VALIDATION=true next build", "clean": "git clean -xdf .next .turbo node_modules", "dev": "pnpm with-env next dev", "format": "prettier --check . --ignore-path ../../.gitignore", diff --git a/packages/job-dispatch/src/config.ts b/packages/job-dispatch/src/config.ts index 09d6e5c62..991f01494 100644 --- a/packages/job-dispatch/src/config.ts +++ b/packages/job-dispatch/src/config.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-restricted-properties */ import { createEnv } from "@t3-oss/env-core"; import { z } from "zod"; @@ -6,7 +7,7 @@ export const env = createEnv({ AMQP_URL: z.string(), AMQP_QUEUE: z.string().default("job_configs"), }, - // eslint-disable-next-line no-restricted-properties runtimeEnv: process.env, emptyStringAsUndefined: true, + skipValidation: !!process.env.CI || !!process.env.SKIP_ENV_VALIDATION, });