SpeedyF/Dockerfile
2024-05-01 14:41:08 +01:00

18 lines
418 B
Docker

FROM node:latest as builder
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:22
RUN apt-get update && apt-get install -y ghostscript
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/package*.json ./
COPY --from=builder /usr/src/app/build ./
COPY ./sh ./sh
COPY ./views ./views
COPY ./static ./static
RUN npm install --omit=dev
EXPOSE 3000
CMD ["node", "./index.js"]