This commit is contained in:
parent
b4da9b6167
commit
1136903942
10
Dockerfile
10
Dockerfile
@ -1,4 +1,10 @@
|
|||||||
FROM debian:bookworm-slim
|
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
|
||||||
LABEL org.opencontainers.image.authors="lxh@cxh.cn"
|
LABEL org.opencontainers.image.authors="lxh@cxh.cn"
|
||||||
|
|
||||||
# 预定义参数
|
# 预定义参数
|
||||||
@ -10,6 +16,8 @@ WORKDIR /app
|
|||||||
# 复制文件
|
# 复制文件
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=core /usr/local/lib/python3.11/site-packages/xywechatpad_binary/binaries/linux_x64 ./WechatAPI/core/
|
COPY --from=core /usr/local/lib/python3.11/site-packages/xywechatpad_binary/binaries/linux_x64 ./WechatAPI/core/
|
||||||
|
#RUN ls -lah ./WechatAPI/core
|
||||||
|
|
||||||
|
|
||||||
# 开始运行
|
# 开始运行
|
||||||
CMD /app/WechatAPI/core/XYWechatPad \
|
CMD /app/WechatAPI/core/XYWechatPad \
|
||||||
|
@ -11,8 +11,10 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
volumes:
|
environment:
|
||||||
- ./data:/var/lib/redis # 登录缓存数据
|
- REDIS_HOST=10.0.0.31
|
||||||
|
- REDIS_PASSWORD=password
|
||||||
|
- REDIS_DB=2
|
||||||
|
|
||||||
```
|
```
|
||||||
~~运行起来之后,直接浏览器打开`http://{your_ip}:9000`就可以看到接口文档了。~~
|
~~运行起来之后,直接浏览器打开`http://{your_ip}:9000`就可以看到接口文档了。~~
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
dir /var/lib/redis
|
|
||||||
save 60 1000
|
|
||||||
appendonly yes
|
|
||||||
appendfsync everysec
|
|
Loading…
x
Reference in New Issue
Block a user