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