From 1c9d647787fd5f3023acea7883a93c1c50eff82c Mon Sep 17 00:00:00 2001 From: mohammadian7 Date: Fri, 5 Jun 2026 22:33:09 +0330 Subject: [PATCH] Fix pip build: use PyPI via VPN proxy instead of Arvan mirror Co-authored-by: Cursor --- Dockerfile | 6 ++++-- deploy/DOKPLOY.md | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0cd430d..4c783a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,9 +25,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /app COPY requirements.txt . +# pip از طریق پروکسی VPN (HTTP_PROXY) به PyPI رسمی — میرور آروان گاهی timeout می‌دهد RUN pip install --no-cache-dir \ - --index-url https://mirror.arvancloud.ir/pypi/simple \ - --trusted-host mirror.arvancloud.ir \ + --default-timeout=300 \ + --retries 10 \ + --index-url https://pypi.org/simple \ -r requirements.txt COPY . . diff --git a/deploy/DOKPLOY.md b/deploy/DOKPLOY.md index 3ac4905..e4b665c 100644 --- a/deploy/DOKPLOY.md +++ b/deploy/DOKPLOY.md @@ -216,7 +216,9 @@ git push origin main **راه‌حل (در Dockerfile اعمال شده):** - Base image از `docker.arvancloud.ir/library/python:3.12-slim-bookworm` -- pip از `mirror.arvancloud.ir` +- pip از `pypi.org` از طریق پروکسی VPN (`172.17.0.1:1081`) + +**اگر pip fail شد:** VPN را روشن کنید و دوباره Deploy بزنید. **قبل از deploy دستی روی سرور (اختیاری):** ```bash