2023-07-28 12:06:33 +05:30
|
|
|
FROM node:18 AS build
|
2020-04-29 08:53:07 +03:00
|
|
|
|
2020-06-18 10:46:24 +01:00
|
|
|
WORKDIR /opt/node_app
|
|
|
|
|
2024-01-01 18:05:48 +01:00
|
|
|
FROM build as production_buildstage
|
|
|
|
|
2021-02-20 14:47:17 +02:00
|
|
|
COPY package.json yarn.lock ./
|
2024-01-01 18:05:48 +01:00
|
|
|
COPY excalidraw-app/package.json ./excalidraw-app/
|
|
|
|
COPY packages/excalidraw/package.json ./packages/excalidraw/
|
2020-06-18 10:46:24 +01:00
|
|
|
|
2024-01-01 18:05:48 +01:00
|
|
|
RUN yarn --network-timeout 600000
|
2020-06-18 10:46:24 +01:00
|
|
|
|
2020-11-07 23:22:19 +01:00
|
|
|
COPY . .
|
2024-01-01 18:05:48 +01:00
|
|
|
|
|
|
|
ARG NODE_ENV=production
|
2021-02-20 14:47:17 +02:00
|
|
|
RUN yarn build:app:docker
|
2020-04-29 08:53:07 +03:00
|
|
|
|
2024-01-07 11:46:08 +01:00
|
|
|
FROM nginxinc/nginx-unprivileged:1.25-alpine-slim as production
|
2020-04-29 08:53:07 +03:00
|
|
|
|
2024-01-01 18:05:48 +01:00
|
|
|
COPY --from=production_buildstage /opt/node_app/excalidraw-app/build /usr/share/nginx/html
|
2020-04-29 08:53:07 +03:00
|
|
|
|
|
|
|
HEALTHCHECK CMD wget -q -O /dev/null http://localhost || exit 1
|
2024-01-01 18:05:48 +01:00
|
|
|
|
|
|
|
FROM build as development
|