Updates to Dockerfile for production
This commit is contained in:
parent
5978505cb7
commit
08a73f7cb2
18
Dockerfile
18
Dockerfile
@ -3,13 +3,13 @@ FROM node:16-alpine AS build-stage
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
RUN npm ci --production
|
||||
|
||||
COPY next.config.js ./
|
||||
COPY tailwind.config.js ./
|
||||
COPY postcss.config.js ./
|
||||
COPY next.config.js .
|
||||
COPY tailwind.config.js .
|
||||
COPY postcss.config.js .
|
||||
COPY components ./components
|
||||
COPY pages ./pages
|
||||
COPY public ./public
|
||||
@ -21,9 +21,15 @@ RUN npm run build
|
||||
FROM node:16-alpine AS production-stage
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build-stage /app/package.json ./package.json
|
||||
COPY --from=build-stage /app/package-lock.json ./package-lock.json
|
||||
COPY --from=build-stage /app/.next ./.next
|
||||
COPY --from=build-stage /app/tailwind.config.js ./tailwind.config.js
|
||||
COPY --from=build-stage /app/postcss.config.js ./postcss.config.js
|
||||
COPY --from=build-stage /app/components ./components
|
||||
COPY --from=build-stage /app/pages ./pages
|
||||
COPY --from=build-stage /app/public ./public
|
||||
COPY --from=build-stage /app/styles ./styles
|
||||
COPY --from=build-stage /app/node_modules ./node_modules
|
||||
|
||||
CMD ["npm", "start"]
|
Reference in New Issue
Block a user