Files
speckle-server/packages/frontend-2/Dockerfile
T
github-actions[bot] 36f749b24a chore(deps): bump image digests (#1939)
* fix(github action): use correct format for author & committer git signing

* Update image digests

Signed-off-by: specklebot <devops@speckle.systems>

---------

Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
Co-authored-by: specklebot <devops@speckle.systems>
2024-01-05 15:57:25 +00:00

58 lines
1.9 KiB
Docker

FROM node:18-bookworm-slim@sha256:fe687021c06383a2bc5eafa6db29b627ed28a55f6bdfbcea108f0c624b783c37 as build-stage
ARG NODE_ENV=production
ARG SPECKLE_SERVER_VERSION=custom
WORKDIR /speckle-server
COPY .yarnrc.yml .
COPY .yarn ./.yarn
COPY package.json yarn.lock ./
COPY utils/ensure-tailwind-deps.mjs ./utils/
COPY packages/viewer/package.json ./packages/viewer/
COPY packages/objectloader/package.json ./packages/objectloader/
COPY packages/shared/package.json ./packages/shared/
COPY packages/ui-components/package.json ./packages/ui-components/
COPY packages/ui-components-nuxt/package.json ./packages/ui-components-nuxt/
COPY packages/tailwind-theme/package.json ./packages/tailwind-theme/
COPY packages/frontend-2/package.json ./packages/frontend-2/
COPY packages/frontend-2/type-augmentations ./packages/frontend-2/
COPY packages/objectloader ./packages/objectloader/
COPY packages/viewer ./packages/viewer/
COPY packages/shared ./packages/shared/
COPY packages/ui-components ./packages/ui-components/
COPY packages/ui-components-nuxt ./packages/ui-components-nuxt/
COPY packages/tailwind-theme ./packages/tailwind-theme/
COPY packages/frontend-2 ./packages/frontend-2/
RUN yarn workspaces focus -A
# hadolint ignore=DL3059
RUN yarn workspaces foreach run build
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
FROM gcr.io/distroless/nodejs18-debian12:nonroot@sha256:645287632214ec051adca0302e744b850f9ae0e10d13f7dcf07e57de80770e35 as production-stage
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
COPY --from=build-stage /tini /tini
ENTRYPOINT ["/tini", "--"]
USER nonroot
ENV PORT=8080
ENV NUXT_PUBLIC_MIXPANEL_TOKEN_ID=acd87c5a50b56df91a795e999812a3a4
ENV NUXT_PUBLIC_MIXPANEL_API_HOST=https://analytics.speckle.systems
WORKDIR /speckle-server
COPY --from=build-stage /speckle-server/packages/frontend-2/.output .
EXPOSE ${PORT}
CMD ["/nodejs/bin/node", "./server/index.mjs"]