Compare commits

..

6 Commits

Author SHA1 Message Date
72f9735000 更新 Dockerfile 2025-10-31 09:44:09 +08:00
ae567a996a 更新 docker-compose.yml 2025-10-31 09:43:56 +08:00
d27a003bb0 添加 docker-compose.yml 2025-10-31 09:29:36 +08:00
a199129ada 添加 Dockerfile 2025-10-31 09:28:42 +08:00
d17d850d67 添加导入分析接口内容 2025-10-30 23:25:55 +08:00
4ff3a1f081 安装启动数据分析治理服务指引 2025-10-30 23:19:41 +08:00
3 changed files with 33 additions and 0 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM python:3.11-slim
# 设置 pip 全局使用国内源
ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple/
ENV PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

View File

@ -77,6 +77,9 @@ nohup uvicorn app.main:app --host 0.0.0.0 --port 8000 > server.log 2>&1 &
Or use a process manager such as `pm2`, `supervisor`, or systemd for production deployments. Or use a process manager such as `pm2`, `supervisor`, or systemd for production deployments.
## API List
1. 导入分析schema接口 http://localhost:8000/v1/import/analyze
## Additional Commands ## Additional Commands
- Run the data import analysis example: `python test/data_import_analysis_example.py` - Run the data import analysis example: `python test/data_import_analysis_example.py`

13
docker-compose.yml Normal file
View File

@ -0,0 +1,13 @@
services:
app:
build: .
ports:
- "8060:8000"
volumes:
- .:/app
environment:
- PYTHONUNBUFFERED=1
# 开发模式:启用 --reload
command: uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
# 生产模式:注释上面 command取消注释下面这行
# command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4