-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.docs
24 lines (20 loc) · 1.11 KB
/
Dockerfile.docs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM node:22-alpine3.21 AS builder
ARG SECUTILS_ENV="prod"
ENV SECUTILS_ENV=${SECUTILS_ENV}
WORKDIR /app
# Copy workspace root `package.json` and `package-lock.json` files,
# and `package.json` file from the component, to just install dependencies.
COPY ["./*.json", "./"]
COPY ["./components/secutils-docs/package.json", "./components/secutils-docs/"]
COPY ["./components/secutils-docs/*.js", "./components/secutils-docs/"]
RUN set -x && npm ci --ws
# Now copy the rest of the component files and build it.
COPY ["./components/secutils-docs/src", "./components/secutils-docs/src"]
COPY ["./components/secutils-docs/static", "./components/secutils-docs/static"]
COPY ["./components/secutils-docs/docs", "./components/secutils-docs/docs"]
COPY ["./components/secutils-docs/blog", "./components/secutils-docs/blog"]
RUN set -x && npm run build --ws
FROM nginxinc/nginx-unprivileged:alpine3.21-slim
COPY --from=builder ["/app/components/secutils-docs/build/", "/usr/share/nginx/html/docs"]
COPY ["./components/secutils-docs/config/nginx.conf", "/etc/nginx/conf.d/default.conf"]