From e7c5d63ad0c146726c59b36ccf47703a7aa54c55 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sun, 24 Sep 2023 22:21:08 +0200 Subject: [PATCH] rework dockerfile 2 --- Dockerfile | 5 +++-- next.config.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 675b7d6..1af4cc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,11 +22,12 @@ ENV NODE_ENV production COPY --from=build /app/public ./public COPY --from=build /app/package.json ./package.json COPY --from=build /app/prisma ./prisma -COPY --from=build /app/.next ./.next +COPY --from=build /app/.next/static ./.next/static +COPY --from=build /app/.next/standalone . EXPOSE 3000 -CMD ["npm", "start"] +CMD ["node", "server.js"] # Install additional tools (curl and grep) RUN apk --no-cache add curl grep diff --git a/next.config.js b/next.config.js index ca412b2..6efd0aa 100644 --- a/next.config.js +++ b/next.config.js @@ -1,5 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: 'standalone', images: { minimumCacheTTL: 60 * 60 * 24 * 30, // 30 days remotePatterns: [