fix(docker): move sitemap build
All checks were successful
deploy / deploy (push) Successful in 1m2s

This commit is contained in:
Lee 2023-11-07 23:11:59 +00:00
parent b24f1db3c1
commit 15aeaa69d5
2 changed files with 4 additions and 6 deletions

@ -17,8 +17,12 @@ ENV NEXT_TELEMETRY_DISABLED 1
ARG GIT_REV ARG GIT_REV
ENV GIT_REV ${GIT_REV} ENV GIT_REV ${GIT_REV}
# Build the app
RUN npm run build RUN npm run build
# Generate sitemap
RUN npm run generate-sitemap
# Run the app # Run the app
FROM base AS runner FROM base AS runner
WORKDIR /app 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/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/package.json ./package.json 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.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 USER nextjs
EXPOSE 80 EXPOSE 80

@ -65,7 +65,6 @@ module.exports = withBundleAnalyzer(nextConfig);
// // Injected content via Sentry wizard below // // Injected content via Sentry wizard below
const { withSentryConfig } = require("@sentry/nextjs"); const { withSentryConfig } = require("@sentry/nextjs");
const { format } = require("path");
module.exports = withSentryConfig( module.exports = withSentryConfig(
module.exports, module.exports,