first commit
This commit is contained in:
24
frontend/Dockerfile
Normal file
24
frontend/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM node:20-alpine AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json /app/
|
||||
RUN npm install
|
||||
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules /app/node_modules
|
||||
COPY . /app
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
COPY --from=builder /app/package.json /app/package.json
|
||||
COPY --from=builder /app/.next /app/.next
|
||||
COPY --from=builder /app/public /app/public
|
||||
COPY --from=builder /app/node_modules /app/node_modules
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["npm","run","start"]
|
||||
Reference in New Issue
Block a user