1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-14 20:06:41 +02:00
unleash.unleash/Dockerfile
Christopher Kolstad d013867f0f
Chore/bump dependencies (#5146)
We're getting security advisories against the node version we're using.
This PR bumps everything to 18.18.2/18.x again. And we'll trust our
excellent monitoring on detecting performance regressions again
2023-10-26 09:09:03 +02:00

39 lines
813 B
Docker

ARG NODE_VERSION=18.18.2-alpine
FROM node:$NODE_VERSION as builder
WORKDIR /unleash
COPY . /unleash
RUN yarn config set network-timeout 300000
RUN yarn install --frozen-lockfile --ignore-scripts && yarn prepare:backend && yarn local:package
# frontend/build should already exist (it needs to be built in the local filesystem but in case of a fresh build we'll build it here)
RUN yarn build:frontend:if-needed
RUN mkdir -p /unleash/build/frontend && mv /unleash/frontend/build /unleash/build/frontend/build
WORKDIR /unleash/docker
RUN yarn install --frozen-lockfile --production=true
FROM node:$NODE_VERSION
ENV NODE_ENV production
ENV TZ UTC
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"]