Update project configuration and structure with Docker support and environment variable adjustments

- Updated .env.example to reflect new LLM configuration with Aliyun's API.
- Enhanced .gitignore to include additional files and directories for better exclusion of sensitive and build artifacts.
- Added docker-compose.yml for streamlined deployment of backend and frontend services.
- Introduced Dockerfiles for both backend and frontend to facilitate containerized builds.
- Created README.md to provide comprehensive project documentation and setup instructions.
- Established nginx configuration for frontend to support API proxying and static file serving.
This commit is contained in:
666ghj
2025-12-17 18:17:40 +08:00
parent e2b1a1554d
commit e432e223df
10 changed files with 517 additions and 36 deletions

34
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
# MiroFish Frontend Dockerfile
# Multi-stage build: Node.js build + Nginx serve
# ============= Build Stage =============
FROM node:20-alpine as builder
WORKDIR /app
# 复制 package 文件
COPY package*.json ./
# 安装依赖
RUN npm ci
# 复制源代码
COPY . .
# 构建生产版本
RUN npm run build
# ============= Production Stage =============
FROM nginx:alpine
# 复制 Nginx 配置
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 复制构建产物
COPY --from=builder /app/dist /usr/share/nginx/html
# 暴露端口
EXPOSE 80
# 启动 Nginx
CMD ["nginx", "-g", "daemon off;"]