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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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