matt HOFFNER commited on
Commit
eed54e3
β€’
1 Parent(s): 7484d72

standalone

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -1
  2. next.config.js +1 -0
Dockerfile CHANGED
@@ -50,6 +50,7 @@ COPY --from=builder /app/public ./public
50
 
51
  # Automatically leverage output traces to reduce image size
52
  # https://nextjs.org/docs/advanced-features/output-file-tracing
 
53
  COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
54
 
55
  USER nextjs
@@ -58,4 +59,4 @@ EXPOSE 3000
58
 
59
  ENV PORT 3000
60
 
61
- CMD ["npm", "run", "start"]
 
50
 
51
  # Automatically leverage output traces to reduce image size
52
  # https://nextjs.org/docs/advanced-features/output-file-tracing
53
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
54
  COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
55
 
56
  USER nextjs
 
59
 
60
  ENV PORT 3000
61
 
62
+ CMD ["node", "server.js"]
next.config.js CHANGED
@@ -1,4 +1,5 @@
1
  module.exports = {
 
2
  webpack: (config, { isServer }) => {
3
  if (!isServer) {
4
  // Web Worker configuration
 
1
  module.exports = {
2
+ output: "standalone",
3
  webpack: (config, { isServer }) => {
4
  if (!isServer) {
5
  // Web Worker configuration