update test deps
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# ============================================================
|
||||
# Stage 1: builder
|
||||
# ============================================================
|
||||
FROM docker.io/library/node:22-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
|
||||
COPY . .
|
||||
|
||||
ARG VITE_API_BASE_URL
|
||||
ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# ============================================================
|
||||
# Stage 2: runtime
|
||||
# ============================================================
|
||||
FROM docker.io/library/nginx:1.27-alpine
|
||||
|
||||
LABEL org.opencontainers.image.title="datahub-frontend" \
|
||||
org.opencontainers.image.vendor="WPIC" \
|
||||
org.opencontainers.image.licenses="MIT" \
|
||||
org.opencontainers.image.source="https://192.168.30.181:3000/wpic-dev/datahub"
|
||||
|
||||
ARG TIMEZONE=Asia/Shanghai
|
||||
ENV TIMEZONE=${TIMEZONE}
|
||||
|
||||
RUN apk add --no-cache tzdata && \
|
||||
ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && \
|
||||
echo "${TIMEZONE}" > /etc/timezone
|
||||
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||
CMD wget -qO- http://127.0.0.1/ -O /dev/null || exit 1
|
||||
Reference in New Issue
Block a user