You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
584 B
20 lines
584 B
FROM --platform=${BUILDPLATFORM} node:18 AS build |
|
|
|
WORKDIR /opt/node_app |
|
|
|
COPY . . |
|
|
|
# do not ignore optional dependencies: |
|
# Error: Cannot find module @rollup/rollup-linux-x64-gnu |
|
RUN --mount=type=cache,target=/root/.cache/yarn \ |
|
npm_config_target_arch=${TARGETARCH} yarn --network-timeout 600000 |
|
|
|
ARG NODE_ENV=production |
|
|
|
RUN npm_config_target_arch=${TARGETARCH} yarn build:app:docker |
|
|
|
FROM --platform=${TARGETPLATFORM} nginx:1.27-alpine |
|
|
|
COPY --from=build /opt/node_app/excalidraw-app/build /usr/share/nginx/html |
|
|
|
HEALTHCHECK CMD wget -q -O /dev/null http://localhost || exit 1
|
|
|