日志补充

This commit is contained in:
lhx
2025-09-27 11:54:22 +08:00
parent 4fd9e635b0
commit b7ad3eb087
3 changed files with 13 additions and 5 deletions

View File

@@ -26,11 +26,11 @@ RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY . .
# 创建日志目录
RUN mkdir -p /app/logs
# 创建日志目录并设置权限
RUN mkdir -p /app/logs && chmod 755 /app/logs
# 暴露端口
EXPOSE 8000
# 启动命令
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--access-log"]
# 启动命令,启用详细日志
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--access-log", "--log-level", "info"]