增加jenkins打包文件

This commit is contained in:
andy committed 2026-08-25 10:19:01 +08:00
1 parent d42f69bd47
commit ed5cfe08b8
4 files changed
+308

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
node_modules/
dist/
.git/
.idea/
.env
.env.*
coverage/
.vite/
*.log
+29
View File
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1
FROM node:22-bookworm-slim AS build
WORKDIR /app
COPY package.json yarn.lock ./
# The project keeps Windows native packages for local Yarn 1 installs. The lock
# file also contains the matching Linux packages used by this container build.
RUN yarn install --frozen-lockfile --non-interactive --ignore-platform
COPY . .
ARG VITE_API_BASE_URL=""
ENV VITE_API_BASE_URL="${VITE_API_BASE_URL}"
RUN yarn build
FROM nginx:1.28-alpine AS runtime
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -q -O /dev/null http://127.0.0.1/healthz || exit 1
+33
View File
@@ -0,0 +1,33 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
index index.html;
charset utf-8;
server_tokens off;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
gzip on;
gzip_min_length 1024;
gzip_types text/css application/javascript application/json image/svg+xml;
location = /healthz {
access_log off;
default_type text/plain;
return 200 "ok\n";
}
location = /index.html {
expires -1;
try_files $uri =404;
}
location / {
try_files $uri $uri/ /index.html;
}
}