mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
🎈 perf: 优化打包速度
注释日志的时间信息
This commit is contained in:
parent
188a7b8bb7
commit
a5c8315c21
3 changed files with 14 additions and 13 deletions
20
Dockerfile
20
Dockerfile
|
|
@ -11,7 +11,7 @@ COPY ZhiKongTaiWeb .
|
|||
RUN yarn build
|
||||
|
||||
# 第二阶段:构建 Python 依赖
|
||||
FROM ccr.ccs.tencentyun.com/kalicyh/poetry:v3.10_latest AS builder
|
||||
FROM ccr.ccs.tencentyun.com/kalicyh/poetry:v3.10_xiaozhi AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -20,15 +20,15 @@ COPY . .
|
|||
# 检查是否有缺失
|
||||
RUN poetry install --no-root
|
||||
|
||||
# 使用清华源加速apt安装
|
||||
RUN rm -rf /etc/apt/sources.list.d/* && \
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends libopus0 ffmpeg && \
|
||||
apt-get clean
|
||||
# 使用清华源加速apt安装,该镜像内置所以注释
|
||||
# RUN rm -rf /etc/apt/sources.list.d/* && \
|
||||
# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
|
||||
# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||
# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||
# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||
# apt-get update && \
|
||||
# apt-get install -y --no-install-recommends libopus0 ffmpeg && \
|
||||
# apt-get clean
|
||||
|
||||
# 从构建阶段复制虚拟环境和前端构建产物
|
||||
COPY --from=frontend-builder /app/ZhiKongTaiWeb/dist /app/manager/static/webui
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ def setup_logging(log_dir='tmp', data_dir='data'):
|
|||
|
||||
# 设置日志格式,时间、日志级别、标签、消息
|
||||
log_format = (
|
||||
"<green>{time:YYYY-MM-DD HH:mm:ss}</green>"
|
||||
# "<green>{time:YYYY-MM-DD HH:mm:ss}</green>"
|
||||
"[<light-blue>{extra[tag]}</light-blue>]"
|
||||
" - <level>{level}</level> - "
|
||||
"<light-green>{message}</light-green>"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
services:
|
||||
xiaozhi-esp32-server:
|
||||
image: ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest
|
||||
image: ccr.ccs.tencentyun.com/kalicyh/esp32-ai-server:latest
|
||||
container_name: xiaozhi-esp32-server
|
||||
restart: always
|
||||
#security_opt:
|
||||
# - seccomp:unconfined
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "8002:8002"
|
||||
volumes:
|
||||
- ./.config.yaml:/opt/xiaozhi-esp32-server/config.yaml
|
||||
- ./data:/app/data
|
||||
Loading…
Reference in a new issue