Fix error

main
mula.liu 2026-01-19 21:43:31 +08:00
parent dde79efac7
commit 90d6524941
2 changed files with 3 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# 使用Python 3.9.6基础镜像 # 使用Python 3.12基础镜像
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.12-slim FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.12-slim
# 设置工作目录 # 设置工作目录
@ -18,6 +18,7 @@ COPY requirements.txt .
# 安装系统依赖、Python依赖然后清理一个RUN命令减少层大小 # 安装系统依赖、Python依赖然后清理一个RUN命令减少层大小
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
gcc \ gcc \
curl \
default-libmysqlclient-dev \ default-libmysqlclient-dev \
pkg-config \ pkg-config \
&& pip install --index-url https://mirrors.aliyun.com/pypi/simple --no-cache-dir -r requirements.txt \ && pip install --index-url https://mirrors.aliyun.com/pypi/simple --no-cache-dir -r requirements.txt \
@ -33,4 +34,4 @@ COPY . .
EXPOSE 8000 EXPOSE 8000
# 启动命令 # 启动命令
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

View File

@ -105,9 +105,6 @@ services:
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"] test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks: networks:
- imeeting-network - imeeting-network