Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Git相关
.git
.gitignore

# Python相关
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 虚拟环境
venv/
env/
ENV/

# IDE相关
.vscode/
.idea/
*.swp
*.swo
*~

# 日志文件
*.log
logs/

# 临时文件
*.tmp
*.temp

# Excel文件目录(如果存在)
excel_files/

# Docker相关
.dockerignore
Dockerfile
docker-compose.yml

# 文档相关
docs/
*.md
!README.md

# 测试相关
tests/
.pytest_cache/
.coverage
htmlcov/

# 其他
.DS_Store
Thumbs.db
53 changes: 47 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
.venv/
dist/
excel_files/
__pycache__/
.notes/
*.log
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.python-version

# Virtual environments
.venv/
venv/
env/
ENV/

# Distribution / packaging
dist/
build/
*.egg-info/
.eggs/

# Environment variables
.env
.env.local
.env.production

# Project specific
excel_files/
.notes/
*.log

# IDE
.vscode/
.idea/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Testing
.pytest_cache/
.coverage
htmlcov/

# Temporary files
*.tmp
*.temp
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 使用官方Python基础镜像
FROM python:3.11-slim

# 设置工作目录
WORKDIR /app

# 设置环境变量
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app

# 跳过系统依赖安装(使用Python内置模块进行健康检查)

# 复制项目文件
COPY pyproject.toml ./
COPY src/ ./src/
COPY README.md ./
COPY LICENSE ./

# 直接安装项目依赖,使用更宽松的超时设置
RUN pip install --no-cache-dir --timeout=300 --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -e .

# 创建Excel文件存储目录
RUN mkdir -p /app/excel_files

# 暴露端口
EXPOSE 8000

# 设置默认环境变量
ENV EXCEL_FILES_PATH=/app/excel_files
ENV FASTMCP_PORT=8000

# 启动命令
CMD ["excel-mcp-server", "streamable-http"]
Loading