Added combined dockerfile for building both apps
This commit is contained in:
parent
489a332d2d
commit
d55adfaab3
1 changed files with 28 additions and 0 deletions
28
compose/prod/Dockerfile
Normal file
28
compose/prod/Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
FROM node:18-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm run build:web
|
||||||
|
RUN npm run build:api
|
||||||
|
|
||||||
|
FROM node:18-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci --omit=dev
|
||||||
|
|
||||||
|
COPY --from=builder /app/dist/apps/api ./dist/api
|
||||||
|
COPY --from=builder /app/dist/apps/web ./dist/web
|
||||||
|
|
||||||
|
COPY ./apps/api/src ./apps/api/src
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["node", "dist/api/main.js"]
|
||||||
Loading…
Reference in a new issue