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,