🐛 fix a bug.
Some checks failed
BuildImage / build-image (push) Failing after 43s

This commit is contained in:
李寻欢 2025-02-20 23:04:38 +08:00
parent 008d29e632
commit b4da9b6167
3 changed files with 9 additions and 31 deletions

View File

@ -1,39 +1,21 @@
FROM python:3.11-slim AS core
RUN pip install --no-cache-dir xywechatpad-binary
RUN pip show xywechatpad-binary
FROM debian:bookworm-slim AS runner
FROM debian:bookworm-slim
LABEL org.opencontainers.image.authors="lxh@cxh.cn"
# 预定义参数
ENV TZ="Asia/Shanghai"
# 安装Redis
RUN apt-get update && apt-get install -y redis-server && \
rm -rf /var/lib/apt/lists/*
# 复制 Redis 配置
COPY redis.conf /etc/redis/redis.conf
# 设置工作目录
WORKDIR /app
# 复制文件
COPY . .
COPY --from=core /usr/local/lib/python3.11/site-packages/xywechatpad_binary/binaries/linux_x64 ./WechatAPI/core/
#RUN ls -lah ./WechatAPI/core
# 授权脚本可执行
RUN chmod +x entrypoint.sh
# 开始运行
#CMD ["/app/WechatAPI/core/XYWechatPad-linux-x86", "--port", "${PORT}", "--mode", "${MODE}", "--redis-host", "${REDIS_HOST}", " --redis-port", "${REDIS_PORT}", "--redis-password", "${REDIS_PASSWORD}", "--redis-db", "${REDIS_DB}"]
#CMD /app/WechatAPI/core/XYWechatPad \
# --port $PORT \
# --mode $MODE \
# --redis-host $REDIS_HOST \
# --redis-port $REDIS_PORT \
# --redis-password $REDIS_PASSWORD \
# --redis-db $REDIS_DB
CMD ["./entrypoint.sh"]
CMD /app/WechatAPI/core/XYWechatPad \
-p $PORT \
-m $MODE \
-rh $REDIS_HOST \
-rp $REDIS_PORT \
-rpwd $REDIS_PASSWORD \
-rdb $REDIS_DB

View File

@ -1,5 +0,0 @@
#!/bin/bash
# 启动Redis服务
redis-server /etc/redis/redis.conf --daemonize yes
# 执行主程序
/app/WechatAPI/core/XYWechatPad --port 9000 --mode release --redis-host 127.0.0.1 --redis-port 6379 --redis-password "" --redis-db 0

View File

@ -44,3 +44,4 @@ graph TB
版本 | 日志
---|---
20250217 | fix: 发送视频报错,视频消息不应该堵塞。
20250220 | fix: 修复无法设置 Redis 的 BUG。