fix: add fallback registries and improve deployment reliability
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 3m2s
Run Tests / Backend Tests (push) Failing after 4m0s
Run Tests / Frontend Tests (push) Failing after 2m0s
Run Tests / Test Summary (push) Failing after 12s

- Add fallback to official npm/PyPI registries when Chinese mirrors fail
- Fix dev workflow mirror host (127.0.0.1 -> 100.78.131.124)
- Add error handling and diagnostics to build steps
- Fix iPhone UI: make download/delete buttons always visible on mobile
- Add .dockerignore to reduce build context size
This commit is contained in:
Gan, Jimmy
2026-04-10 01:00:49 +08:00
parent 1ff48ab86d
commit c180a68f36
5 changed files with 31 additions and 6 deletions
+4 -2
View File
@@ -3,7 +3,8 @@ FROM node:20-alpine AS frontend
WORKDIR /build
COPY frontend/package.json frontend/package-lock.json* ./
COPY frontend/ ./
RUN npm install --registry=https://registry.npmmirror.com && npm run build
RUN npm install --registry=https://registry.npmmirror.com || npm install
RUN npm run build
# Stage 2: Python runtime
FROM python:3.12-slim
@@ -11,7 +12,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends openssh-client
RUN adduser --disabled-password --no-create-home --gecos "" app
WORKDIR /app
COPY backend/requirements.txt .
RUN pip install --no-cache-dir --index-url https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
RUN pip install --no-cache-dir --index-url https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt || \
pip install --no-cache-dir -r requirements.txt
COPY backend/ ./
COPY --from=frontend /build/dist /app/static
RUN chown -R app:app /app