2023-03-22 13:02:32 +01:00
|
|
|
FROM node:18-alpine3.17 as build
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn install
|
|
|
|
|
|
|
|
|
|
|
|
COPY src ./src
|
|
|
|
COPY api ./api
|
|
|
|
COPY env ./env
|
|
|
|
COPY tsconfig.json ./tsconfig.json
|
|
|
|
COPY tsconfig.prod.json ./tsconfig.prod.json
|
|
|
|
|
|
|
|
RUN yarn run build
|
|
|
|
|
2023-04-03 12:27:47 +02:00
|
|
|
FROM node:18-alpine3.17 as app
|
2023-03-22 13:02:32 +01:00
|
|
|
|
|
|
|
USER node
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=build /app/node_modules /app/node_modules
|
|
|
|
COPY --from=build /app/env /app/dist/env
|
|
|
|
COPY --from=build /app/package.json /app/package.json
|
|
|
|
COPY --from=build /app/dist /app/dist
|
|
|
|
|
2023-04-03 12:27:47 +02:00
|
|
|
ENTRYPOINT node dist/src/server.js -e production
|