-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
29 lines (26 loc) · 896 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM node:20-alpine AS base
FROM base AS pruner
WORKDIR /app
ENV DO_NOT_TRACK=1
COPY . .
RUN npm ci --workspaces=false
RUN npx turbo prune @eop/client --docker
FROM base AS builder
WORKDIR /app
ENV DO_NOT_TRACK=1
COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/package-lock.json ./package-lock.json
RUN npm ci
COPY --from=pruner /app/out/full/ .
ARG VITE_EOP_IMPRINT
ARG VITE_EOP_PRIVACY
ARG VITE_EOP_BANNER_TEXT
ENV VITE_EOP_IMPRINT=$VITE_EOP_IMPRINT
ENV VITE_EOP_PRIVACY=$VITE_EOP_PRIVACY
ENV VITE_EOP_BANNER_TEXT=$VITE_EOP_BANNER_TEXT
RUN npx turbo run build
FROM nginxinc/nginx-unprivileged:1.27.0-alpine
COPY --from=builder /app/apps/client/nginx/etc/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /app/apps/client/nginx/etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/apps/client/build /usr/share/nginx/html/
EXPOSE 8080