From 15aeaa69d51a4c2d950c68f7d7d648ada5fdba6c Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 7 Nov 2023 23:11:59 +0000 Subject: [PATCH] fix(docker): move sitemap build --- Dockerfile | 9 ++++----- next.config.js | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5819765..22beeb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,8 +17,12 @@ ENV NEXT_TELEMETRY_DISABLED 1 ARG GIT_REV ENV GIT_REV ${GIT_REV} +# Build the app RUN npm run build +# Generate sitemap +RUN npm run generate-sitemap + # Run the app FROM base AS runner WORKDIR /app @@ -37,11 +41,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/package.json ./package.json COPY --from=builder --chown=nextjs:nodejs /app/next.config.js ./next.config.js -COPY --from=builder --chown=nextjs:nodejs /app/next-sitemap.config.js ./next-sitemap.config.js -COPY --from=builder --chown=nextjs:nodejs /app/src/ssrSettings.json ./src/ssrSettings.json - -# Generate sitemap -RUN npm run generate-sitemap USER nextjs EXPOSE 80 diff --git a/next.config.js b/next.config.js index 543ddc9..6137917 100644 --- a/next.config.js +++ b/next.config.js @@ -65,7 +65,6 @@ module.exports = withBundleAnalyzer(nextConfig); // // Injected content via Sentry wizard below const { withSentryConfig } = require("@sentry/nextjs"); -const { format } = require("path"); module.exports = withSentryConfig( module.exports,