Add deployment
CI / frontend (push) Failing after 57s
CI / backend (push) Failing after 6m27s

This commit is contained in:
voltsrage
2026-08-05 00:26:20 +08:00
parent 9e88ff6113
commit 2a3ef62a7d
86 changed files with 2320 additions and 174 deletions
+21
View File
@@ -0,0 +1,21 @@
FROM node:22-alpine AS build
WORKDIR /src
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
# Vite substitutes import.meta.env.VITE_* at build time — these must be
# build arguments, not runtime environment variables.
ARG VITE_API_URL
ARG VITE_SHOW_OPS=false
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_SHOW_OPS=$VITE_SHOW_OPS
RUN npm run build
FROM nginx:1.27-alpine AS runtime
COPY --from=build /src/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
CMD wget -qO- http://localhost/ >/dev/null || exit 1