---初始化后台管理web页面项目

This commit is contained in:
2025-08-20 14:39:30 +08:00
parent ad49711a7e
commit 87545a8baf
2057 changed files with 282864 additions and 213 deletions

30
docker/Dockerfile-node Normal file
View File

@ -0,0 +1,30 @@
FROM --platform=linux/arm64 docker.xuanyuan.run/library/node:20.15.1-slim
# 设置工作目录
WORKDIR /app
# 安装依赖http-server和http-proxy-middleware
RUN npm install http-server http-proxy-middleware --production
# 复制自定义服务器脚本server.js
COPY ./server.js /app/
# 复制静态文件到工作目录根据实际项目调整如dist目录
# 假设静态文件在当前目录的dist文件夹下
RUN mkdir -p /app/html
COPY index.html /app/html/index.html
# 暴露端口与server.js中配置的port一致
EXPOSE 8080
# 启动命令通过node运行server.js
CMD ["node", "server.js"]
# docker build -f Dockerfile-node -t node-http-server:1.0.3 .