Fix Dockerfile to copy all files and build Next.js app

- Change COPY * to COPY . to include subdirectories (public/, app/, etc.)
- Add npm run build step for Next.js production build
- Change CMD from node server.js to npm start for Next.js
This commit is contained in:
Claude
2026-01-26 05:05:52 +00:00
parent b28e7942c3
commit 205b753e9b

View File

@@ -1,7 +1,8 @@
FROM node
WORKDIR /app
COPY * /app/
COPY . /app/
RUN npm i
RUN npm run build
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["node", "server.js"]
CMD ["npm", "start"]