Fix pip build: use PyPI via VPN proxy instead of Arvan mirror

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-05 22:33:09 +03:30
parent 8ab80c00e9
commit 1c9d647787
2 changed files with 7 additions and 3 deletions
+4 -2
View File
@@ -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 . .
+3 -1
View File
@@ -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