新增: 实时热卖榜(11分类/想要人数排序/热门搜索词热度)、价格监控(目标价通知/卖家信用筛选/销量下限/AI精准监控)、 一键转卖(收藏自动加载/改价直发/详情直达)、AI回复免费token(ai.88531.cn)、API密钥掩码、 推理模型兼容修复、商品本地编辑、授权系统接入(在线人数/版本/公告)、品牌更名躺赚鱼。 README 重写为项目介绍(改动清单/优势/真实截图/两种安装方式/体验地址 tzy.88531.cn/使用引导), 原版 README 完整保留为 README.upstream.md。
78 lines
2.0 KiB
Docker
78 lines
2.0 KiB
Docker
FROM python:3.11-slim-bookworm AS base
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
TZ=Asia/Shanghai \
|
|
DOCKER_ENV=true \
|
|
PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
|
|
|
WORKDIR /app
|
|
|
|
FROM node:20-alpine AS frontend-builder
|
|
|
|
WORKDIR /frontend
|
|
COPY frontend/package.json frontend/package-lock.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN VITE_OUT_DIR=dist npm run build
|
|
|
|
FROM base AS builder
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends curl ca-certificates && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN python -m venv /opt/venv && \
|
|
/opt/venv/bin/pip install --no-cache-dir --upgrade pip
|
|
|
|
ENV VIRTUAL_ENV=/opt/venv
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
COPY --from=frontend-builder /frontend/dist ./static
|
|
|
|
FROM base AS runtime
|
|
|
|
LABEL maintainer="23Star" \
|
|
version="3.0.0-beta" \
|
|
description="Xianyu account, item, order, reply, and delivery management" \
|
|
repository="https://github.com/23Star/xianyu-super-butler" \
|
|
author="23Star"
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
tzdata \
|
|
curl \
|
|
ca-certificates \
|
|
fonts-dejavu-core \
|
|
fonts-liberation \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
xvfb \
|
|
x11-utils \
|
|
nodejs \
|
|
npm && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /opt/venv /opt/venv
|
|
COPY --from=builder /app /app
|
|
|
|
ENV VIRTUAL_ENV=/opt/venv
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
|
|
RUN playwright install-deps chromium && \
|
|
playwright install chromium && \
|
|
mkdir -p /app/logs /app/data /app/backups /app/static/uploads/images && \
|
|
chmod 777 /app/logs /app/data /app/backups /app/static/uploads /app/static/uploads/images && \
|
|
chmod +x /app/entrypoint.sh
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=5 \
|
|
CMD curl -f http://localhost:8080/health || exit 1
|
|
|
|
CMD ["/app/entrypoint.sh"]
|