add prod build id fetching
Some checks failed
deploy / deploy (push) Failing after 8s

This commit is contained in:
Lee 2023-10-20 12:00:41 +01:00
parent 37523d6855
commit ede2fec794
2 changed files with 5 additions and 1 deletions

@ -34,6 +34,9 @@ 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
ARG GIT_REV
ENV GIT_REV ${GIT_REV}
USER nextjs
EXPOSE 80
ENV HOSTNAME "0.0.0.0"

@ -5,7 +5,8 @@ const nextConfig = {
generateEtags: true,
compress: true,
env: {
NEXT_PUBLIC_BUILD_ID: nextBuildId.sync({ dir: __dirname }),
NEXT_PUBLIC_BUILD_ID:
process.env.GIT_REV || nextBuildId.sync({ dir: __dirname }),
},
images: {
remotePatterns: [