ci: 添加 Docker 构建和推送工作流

- 新增 Dockerfile 和 .dockerignore 文件
- 添加 Gitea 持续集成工作流,用于构建和推送 Docker 镜像
- 新增 .gitignore 文件,忽略构建和配置文件
- 添加项目结构和规范文档,包括 TypeScript、模块化、API、数据库等规范
- 新增前端和后端的基础代码结构
This commit is contained in:
D8D Developer
2025-06-11 09:35:39 +00:00
commit 71aaeb9424
70 changed files with 4170 additions and 0 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# 使用指定基础镜像
FROM node:20.18.3
# 设置工作目录
WORKDIR /app
# 复制package.json .npmrc和package-lock.json
COPY package.json .npmrc package-lock.json* ./
# 安装依赖
RUN npm install
# 复制项目文件
COPY . .
# 构建项目
RUN npm run build
# 暴露端口(根据实际需要调整)
EXPOSE 23956
# 启动命令
CMD ["npm", "run", "start"]