2021-01-08 00:20:27 +01:00
|
|
|
# typescript build
|
2022-05-06 17:14:18 +02:00
|
|
|
FROM node:16.15-buster-slim@sha256:9ad2f889d4a15ef94e40ac75e95c28daa34073dbc25d7b1e619caacc6b83623c as builder2
|
2021-01-08 00:20:27 +01:00
|
|
|
WORKDIR /usr/src
|
|
|
|
COPY uploader/yarn.lock uploader/package.json ./
|
2020-12-09 21:29:29 +01:00
|
|
|
RUN yarn install
|
2021-01-08 00:20:27 +01:00
|
|
|
COPY uploader .
|
2020-12-09 21:29:29 +01:00
|
|
|
ENV NODE_ENV=production
|
|
|
|
RUN yarn run tsc
|
|
|
|
|
2021-01-08 00:20:27 +01:00
|
|
|
# final production image
|
2022-05-06 17:14:18 +02:00
|
|
|
FROM node:16.15-buster-slim@sha256:9ad2f889d4a15ef94e40ac75e95c28daa34073dbc25d7b1e619caacc6b83623c
|
2021-01-08 00:20:27 +01:00
|
|
|
WORKDIR /usr/src
|
|
|
|
COPY uploader/yarn.lock uploader/package.json ./
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
RUN yarn install --production
|
2022-02-25 18:53:14 +01:00
|
|
|
COPY --from=builder2 /usr/src/dist /usr/src/dist
|
2021-01-08 00:20:27 +01:00
|
|
|
|
|
|
|
USER node
|
2022-05-11 11:42:32 +02:00
|
|
|
CMD ["yarn", "run", "runprod"]
|