Modify dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
tobias 2024-06-26 11:20:50 +02:00
parent 7a198ec4c3
commit b6357c5676
2 changed files with 14 additions and 2 deletions

View File

@ -40,7 +40,9 @@ COPY --from=builder /base/next.config.mjs ./
# Production: serve the website # Production: serve the website
FROM runner as prod FROM runner as prod
EXPOSE 3000 ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY docker-entrypoint.sh /docker-entrypoint.sh COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["pnpm", "start:standalone"] CMD ["pnpm", "start:standalone"]

View File

@ -2,7 +2,6 @@ import { withPayload } from '@payloadcms/next/withPayload'
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
// Your Next.js config here
experimental: { experimental: {
reactCompiler: false, reactCompiler: false,
}, },
@ -11,6 +10,17 @@ const nextConfig = {
PORT: process.env.PORT, PORT: process.env.PORT,
HOSTNAME: process.env.HOSTNAME, HOSTNAME: process.env.HOSTNAME,
}, },
// Disable minification & chunking for debugging
/* webpack(config, { dev }) {
config.optimization.minimize = false
config.optimization.splitChunks = {
cacheGroups: {
default: false,
},
}
config.optimization.runtimeChunk = false
return config
}, */
} }
export default withPayload(nextConfig) export default withPayload(nextConfig)