web->client,结构优化

This commit is contained in:
shuaiplus committed 2025-05-24 18:56:09 +08:00
1 parent 4ceba6a609
commit ffc73a4212
17 files changed
+15 -21

No files matched your search

+5 -7
View File
@@ -31,7 +31,7 @@ RUN npm ci --no-audit || npm install --no-audit
# Copy source code and configuration files
# 复制源代码和配置文件
COPY vite.config.js ./
COPY web/ ./web/
COPY client/ ./client/
# Build the frontend
# 构建前端
@@ -44,7 +44,7 @@ FROM docker.1ms.run/alpine:3.16
# Install minimal Node.js and Nginx
# 安装最小化版本的 Node.js 和 Nginx
RUN apk add --no-cache nodejs nginx && \
mkdir -p /app/server /app/web /run/nginx && \
mkdir -p /app/server /app/client /run/nginx && \
# Clean up apk cache
# 清理 apk 缓存
rm -rf /var/cache/apk/*
@@ -55,7 +55,7 @@ COPY --from=backend-builder /app/server/node_modules /app/server/node_modules
COPY --from=backend-builder /app/server/*.js /app/server/
# Copy built frontend files from the frontend build stage
# 从前端构建阶段复制构建好的文件,而不是复制 dist 目录
COPY --from=frontend-builder /app/dist/ /app/web/
COPY --from=frontend-builder /app/dist/ /app/client/
# Optimized Nginx configuration
# 优化的 Nginx 配置
@@ -91,12 +91,10 @@ http {
server {
listen 80;
server_name localhost;
# Serve static files
server_name localhost; # Serve static files
# 提供静态文件服务
location / {
root /app/web;
root /app/client;
index index.html;
try_files $uri $uri/ /index.html;
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 191 KiB

After

Width:  |  Height:  |  Size: 191 KiB

+2 -3
View File
@@ -330,11 +330,10 @@ body {
flex: 2.5;
}
.main::before {
content: "";
.main::before { content: "";
position: absolute;
inset: 0;
background: url(./wallpaper.png) left top / auto 100% no-repeat;
background: url(../assets/wallpaper.png) left top / auto 100% no-repeat;
opacity: 0.15;
mix-blend-mode: multiply;
pointer-events: none;
+5 -7
View File
@@ -1,11 +1,10 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<head> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NodeCrypt</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<link rel="stylesheet" href="css/style.css">
<link rel="icon" type="image/svg+xml" href="assets/favicon.svg">
</head>
<body>
<div class="login-container" id="login-container">
@@ -77,8 +76,7 @@
</div>
<div class="rightbar-tabs tabs" id="member-tabs"> </div>
<div class="members" id="member-list"> </div>
</div>
</div>
<script type="module" src="./main.js"></script>
</div> </div>
<script type="module" src="./js/main.js"></script>
</body>
</html>
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3 -4
View File
@@ -4,7 +4,7 @@ import {
export default defineConfig({
// Root directory
// 根目录
root: 'web',
root: 'client',
// Base URL
// 基础 URL
base: './',
@@ -37,10 +37,9 @@ export default defineConfig({
},
// Rollup options
// Rollup 选项
rollupOptions: {
// Input file
rollupOptions: { // Input file
// 输入文件
input: 'web/index.html',
input: 'client/index.html',
// Output options
// 输出选项
output: {