2023-04-18 10:35:32 +02:00
|
|
|
ARG NODE_VERSION=18-alpine
|
2022-06-28 16:13:00 +02:00
|
|
|
|
2022-08-30 14:39:28 +02:00
|
|
|
FROM node:$NODE_VERSION as builder
|
2022-06-28 16:13:00 +02:00
|
|
|
|
|
|
|
WORKDIR /unleash
|
|
|
|
|
|
|
|
COPY . /unleash
|
|
|
|
|
2022-08-29 15:00:04 +02:00
|
|
|
RUN yarn config set network-timeout 300000
|
|
|
|
|
2023-06-06 21:26:21 +02:00
|
|
|
RUN yarn install --frozen-lockfile && yarn local:package
|
2022-08-30 14:39:28 +02:00
|
|
|
|
2023-05-12 13:25:38 +02:00
|
|
|
RUN mkdir /unleash/build/frontend && cp -r /unleash/frontend/build /unleash/build/frontend/build
|
2022-06-28 16:13:00 +02:00
|
|
|
|
|
|
|
WORKDIR /unleash/docker
|
|
|
|
|
|
|
|
RUN yarn install --frozen-lockfile --production=true
|
|
|
|
|
|
|
|
FROM node:$NODE_VERSION
|
|
|
|
|
|
|
|
ENV NODE_ENV production
|
|
|
|
|
2023-05-03 09:25:56 +02:00
|
|
|
ENV TZ UTC
|
|
|
|
|
2022-06-28 16:13:00 +02:00
|
|
|
WORKDIR /unleash
|
|
|
|
|
|
|
|
COPY --from=builder /unleash/docker /unleash
|
|
|
|
|
|
|
|
RUN rm -rf /usr/local/lib/node_modules/npm/
|
|
|
|
|
|
|
|
EXPOSE 4242
|
|
|
|
|
|
|
|
USER node
|
|
|
|
|
|
|
|
CMD ["node", "index.js"]
|