feat: pre-built dist, nginx-only Dockerfile (no server-side build)

This commit is contained in:
Superuser
2026-05-18 23:48:48 +08:00
parent 6ac1d24d21
commit 9adfe90b4c
13 changed files with 67 additions and 10 deletions
-2
View File
@@ -1,8 +1,6 @@
# Dependencies # Dependencies
node_modules/ node_modules/
# Build outputs
dist/
# TypeScript cache # TypeScript cache
*.tsbuildinfo *.tsbuildinfo
+1 -8
View File
@@ -1,12 +1,5 @@
FROM node:24-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm config set registry https://registry.npmmirror.com && npm install
COPY . .
RUN npm run build
FROM nginx:alpine FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html COPY dist/ /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
+52
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

+13
View File
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>邓小洲</title>
<script type="module" crossorigin src="/assets/index-BefvYNIT.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CT9c6d2t.css">
</head>
<body>
<div id="root"></div>
</body>
</html>