From 33fa8a1f65f4c9b712faa23ec068fd734e46711a Mon Sep 17 00:00:00 2001 From: WanQuanXie Date: Thu, 9 May 2024 03:11:10 +0800 Subject: [PATCH] build(app): limit Next.js standalone output mode only for docker image --- app.dockerfile | 3 +++ ui/next.config.mjs | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app.dockerfile b/app.dockerfile index f0e5560..7852b9e 100644 --- a/app.dockerfile +++ b/app.dockerfile @@ -4,6 +4,9 @@ WORKDIR /home/perplexica COPY ui /home/perplexica/ +# Specific Next.js output for standalone +RUN echo "const nextConfig={output: 'standalone',images:{remotePatterns:[{hostname:'s2.googleusercontent.com'}]}};export default nextConfig;" > ./next.config.mjs + RUN yarn install RUN yarn build diff --git a/ui/next.config.mjs b/ui/next.config.mjs index 89a0c95..c3f2e1a 100644 --- a/ui/next.config.mjs +++ b/ui/next.config.mjs @@ -1,6 +1,5 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: 'standalone', images: { remotePatterns: [ {