golem-flask-backend / Dockerfile.frontend
mememechez's picture
Deploy final cleaned source code
ca28016
raw
history blame
526 Bytes
# syntax=docker/dockerfile:1.7
FROM node:20-slim AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci --no-audit --no-fund
FROM deps AS build
COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build
FROM node:20-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production \
NEXT_TELEMETRY_DISABLED=1 \
PORT=9002
COPY --from=build /app/.next ./.next
COPY --from=build /app/public ./public
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/package*.json ./
EXPOSE 9002
CMD ["npm", "run", "start"]