开始多平台 多店铺整改

This commit is contained in:
yml
2026-04-08 22:21:11 +08:00
parent d5b10e3f7f
commit a2b09c89e8
40 changed files with 1750 additions and 685 deletions
+5 -8
View File
@@ -5,9 +5,8 @@ ARG NPM_REGISTRY=https://registry.npmmirror.com
ARG UV_INDEX_URL=https://mirrors.cloud.tencent.com/pypi/simple
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
ENV UV_LINK_MODE=copy
ENV UV_INDEX_URL=${UV_INDEX_URL}
ENV PIP_INDEX_URL=${UV_INDEX_URL}
ENV NPM_CONFIG_REGISTRY=${NPM_REGISTRY}
@@ -17,20 +16,18 @@ RUN sed -i "s|http://deb.debian.org/debian|https://${DEBIAN_MIRROR}/debian|g" /e
&& sed -i "s|http://security.debian.org/debian-security|https://${DEBIAN_MIRROR}/debian-security|g" /etc/apt/sources.list.d/debian.sources
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates python3 python3-pip \
&& apt-get install -y --no-install-recommends curl ca-certificates python3 python3-pip tzdata \
&& ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --no-cache-dir --break-system-packages uv \
&& ln -sf /usr/local/bin/uv /usr/bin/uv
COPY apps/backend/package.json apps/backend/package-lock.json ./
RUN --mount=type=cache,target=/root/.npm npm ci
RUN PLAYWRIGHT_DOWNLOAD_HOST=https://npmmirror.com/mirrors/playwright/ npx playwright install --with-deps chromium
COPY apps/backend/subservices/ocr-worker/ ./subservices/ocr-worker/
RUN --mount=type=cache,target=/root/.cache/uv rm -f subservices/ocr-worker/uv.lock \
&& uv sync --directory subservices/ocr-worker
RUN python3 -m pip install --no-cache-dir --break-system-packages ./subservices/ocr-worker
COPY apps/backend/ ./