Separate API, proc

This commit is contained in:
oitsjustjose 2023-04-22 23:46:37 -05:00
commit 6a3f531527
27 changed files with 334 additions and 104 deletions

27
backend/Dockerfile Normal file
View file

@ -0,0 +1,27 @@
FROM node:18 AS builder
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run ts:build
FROM node:18-alpine AS server
WORKDIR /usr/src/app
RUN chown -R node:node /usr/src/app
USER node
EXPOSE 5000
COPY package*.json ./
RUN npm install --production
COPY --from=0 /usr/src/app/dist dist
ENV NODE_ENV=production
CMD ["node", "dist/server.js"]