From 04265fda3bb683feda45c64c4f2c1b455c6dbbe2 Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Wed, 24 Jun 2026 10:07:44 +0200 Subject: [PATCH] Fix Docker build - enable Next.js static export - Updated Dockerfile to install pnpm@9 explicitly - Enabled static export in next.config.ts (output: export) - Removed pnpm-workspace.yaml (not needed for single project) - Docker build now succeeds and serves static files Co-Authored-By: Paperclip --- Dockerfile | 5 ++++- next.config.ts | 2 +- pnpm-workspace.yaml | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 pnpm-workspace.yaml diff --git a/Dockerfile b/Dockerfile index 6ec70282..1414d24b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,12 @@ FROM node:20-alpine AS builder WORKDIR /app +# Install pnpm +RUN npm install -g pnpm@9 + # Install dependencies COPY package.json pnpm-lock.yaml ./ -RUN corepack enable && pnpm install --frozen-lockfile +RUN pnpm install --frozen-lockfile # Build the application COPY . . diff --git a/next.config.ts b/next.config.ts index e9ffa308..65c102b9 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ + output: "export", }; export default nextConfig; diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml deleted file mode 100644 index a2a1883d..00000000 --- a/pnpm-workspace.yaml +++ /dev/null @@ -1,3 +0,0 @@ -allowBuilds: - sharp: set this to true or false - unrs-resolver: set this to true or false