backend/Dockerfile
Fred Boniface 159c46c4cc Add support for deploying from TS source
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-07-28 20:51:43 +01:00

17 lines
326 B
Docker

FROM node:20 as builder
EXPOSE 8460
WORKDIR /usr/src/app
COPY ./package*.json ./
RUN npm i
COPY . .
RUN npm run build
FROM node:20-slim
EXPOSE 8460
WORKDIR /usr/src/app
COPY ./mail-templates/* ./mail-templates/
COPY ./package*.json ./
RUN npm ci --omit=dev
COPY --from=builder /usr/src/app/dist/ ./
CMD [ "node" , "app.js" ]