build: 清理未使用变量优化构建

This commit is contained in:
Cassianvale
2025-03-07 14:47:01 +08:00
parent 994737b6b4
commit 96791877f4
7 changed files with 3264 additions and 2662 deletions

View File

@@ -4,20 +4,17 @@ FROM node:18-alpine as build-stage
# 设置工作目录 # 设置工作目录
WORKDIR /app WORKDIR /app
# 安装 yarn # 复制 package.json 和 package-lock.json如果有
RUN apk add --no-cache yarn COPY package*.json ./
# 复制 package.json 和 yarn.lock如果有
COPY package*.json yarn*.lock ./
# 安装依赖 # 安装依赖
RUN yarn install --frozen-lockfile RUN npm ci
# 复制项目文件 # 复制项目文件
COPY . . COPY . .
# 构建应用 # 构建应用
RUN yarn build RUN npm run build
# 生产阶段 # 生产阶段
FROM nginx:stable-alpine as production-stage FROM nginx:stable-alpine as production-stage
@@ -35,5 +32,5 @@ EXPOSE 80
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:80 || exit 1 CMD wget --quiet --tries=1 --spider http://localhost:80 || exit 1
# 启动nginx # 设定Nginx是否以守护进程的方式启动
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]

File diff suppressed because it is too large Load Diff

View File

@@ -11,13 +11,13 @@
"dependencies": { "dependencies": {
"@types/node": "^22.13.9", "@types/node": "^22.13.9",
"@vicons/ionicons5": "^0.13.0", "@vicons/ionicons5": "^0.13.0",
"@vueuse/core": "^12.7.0", "@vueuse/core": "^12.8.2",
"axios": "^1.8.1", "axios": "^1.8.1",
"marked": "^15.0.7", "marked": "^15.0.7",
"naive-ui": "^2.41.0", "naive-ui": "^2.41.0",
"npm": "^11.2.0", "npm": "^10.8.2",
"vue": "^3.5.13", "vue": "^3.5.13",
"vue-router": "4" "vue-router": "^4.5.0"
}, },
"devDependencies": { "devDependencies": {
"@types/marked": "^5.0.2", "@types/marked": "^5.0.2",

View File

@@ -188,7 +188,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted, reactive } from 'vue'; import { ref, computed, onMounted } from 'vue';
import { import {
NButton, NButton,
NIcon, NIcon,

View File

@@ -125,7 +125,7 @@
:columns="stockTableColumns" :columns="stockTableColumns"
:data="analyzedStocks" :data="analyzedStocks"
:pagination="{ pageSize: 10 }" :pagination="{ pageSize: 10 }"
:row-key="(row) => row.code" :row-key="(row: StockInfo) => row.code"
:bordered="false" :bordered="false"
:single-line="false" :single-line="false"
striped striped
@@ -141,12 +141,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, h } from 'vue'; import { ref, onMounted, h } from 'vue';
import { import {
NLayout, NLayout,
NLayoutContent, NLayoutContent,
NCard, NCard,
NPageHeader,
NIcon, NIcon,
NGrid, NGrid,
NGridItem, NGridItem,
@@ -165,7 +164,6 @@ import {
} from 'naive-ui'; } from 'naive-ui';
import { useClipboard } from '@vueuse/core' import { useClipboard } from '@vueuse/core'
import { import {
BarChartOutline as BarChartIcon,
DocumentTextOutline as DocumentTextIcon, DocumentTextOutline as DocumentTextIcon,
DownloadOutline as DownloadIcon, DownloadOutline as DownloadIcon,
NotificationsOutline as NotificationsIcon NotificationsOutline as NotificationsIcon

File diff suppressed because it is too large Load Diff

View File

@@ -424,4 +424,4 @@ async def serve_frontend(full_path: str, request: Request):
if __name__ == '__main__': if __name__ == '__main__':
logger.info("股票AI分析系统启动") logger.info("股票AI分析系统启动")
uvicorn.run("web_server:app", host="127.0.0.1", port=8888, reload=True) uvicorn.run("web_server:app", host="0.0.0.0", port=8888, reload=True)