diff --git a/Dockerfile b/Dockerfile index 0f39654..75c762e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,9 @@ COPY --from=builder /base/next.config.mjs ./ # Production: serve the website FROM runner as prod -EXPOSE 3000 +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["pnpm", "start:standalone"] diff --git a/next.config.mjs b/next.config.mjs index 46cfff3..8fece3b 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -2,7 +2,6 @@ import { withPayload } from '@payloadcms/next/withPayload' /** @type {import('next').NextConfig} */ const nextConfig = { - // Your Next.js config here experimental: { reactCompiler: false, }, @@ -11,6 +10,17 @@ const nextConfig = { PORT: process.env.PORT, HOSTNAME: process.env.HOSTNAME, }, + // Disable minification & chunking for debugging + /* webpack(config, { dev }) { + config.optimization.minimize = false + config.optimization.splitChunks = { + cacheGroups: { + default: false, + }, + } + config.optimization.runtimeChunk = false + return config + }, */ } export default withPayload(nextConfig)