This commit is contained in:
parent
008d29e632
commit
b4da9b6167
34
Dockerfile
34
Dockerfile
@ -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
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user