From a21ef7d3a4561963832b5978b4dd85dc18901e69 Mon Sep 17 00:00:00 2001 From: Citali Date: Sun, 28 Dec 2025 00:59:44 +0100 Subject: [PATCH] Fix dynamic build --- Dockerfile | 4 ++-- src/app/(normal)/artworks/animalstudies/index/page.tsx | 3 --- src/app/layout.tsx | 3 +++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a643d0..d7cb67e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ RUN bunx prisma generate # Uncomment the following line in case you want to disable telemetry during the build. ENV NEXT_TELEMETRY_DISABLED=1 -ARG DATABASE_URL -ENV DATABASE_URL=$DATABASE_URL +ARG DOCKER_BUILD=0 +ENV DOCKER_BUILD=$DOCKER_BUILD # Copy the rest of the code RUN bun run build diff --git a/src/app/(normal)/artworks/animalstudies/index/page.tsx b/src/app/(normal)/artworks/animalstudies/index/page.tsx index c11b9da..169ceec 100644 --- a/src/app/(normal)/artworks/animalstudies/index/page.tsx +++ b/src/app/(normal)/artworks/animalstudies/index/page.tsx @@ -1,6 +1,3 @@ -export const dynamic = "force-dynamic"; -export const revalidate = 0; - import { prisma } from "@/lib/prisma"; import Link from "next/link"; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 66c5385..7d47d7f 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,6 +3,9 @@ import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; +export const dynamic = process.env.DOCKER_BUILD === "1" ? "force-dynamic" : "auto"; +export const revalidate = process.env.DOCKER_BUILD === "1" ? 0 : false; + const geistSans = Geist({ variable: "--font-geist-sans", subsets: ["latin"],