Fix pip build: use PyPI via VPN proxy instead of Arvan mirror
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+4
-2
@@ -25,9 +25,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
# pip از طریق پروکسی VPN (HTTP_PROXY) به PyPI رسمی — میرور آروان گاهی timeout میدهد
|
||||||
RUN pip install --no-cache-dir \
|
RUN pip install --no-cache-dir \
|
||||||
--index-url https://mirror.arvancloud.ir/pypi/simple \
|
--default-timeout=300 \
|
||||||
--trusted-host mirror.arvancloud.ir \
|
--retries 10 \
|
||||||
|
--index-url https://pypi.org/simple \
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
+3
-1
@@ -216,7 +216,9 @@ git push origin main
|
|||||||
|
|
||||||
**راهحل (در Dockerfile اعمال شده):**
|
**راهحل (در Dockerfile اعمال شده):**
|
||||||
- Base image از `docker.arvancloud.ir/library/python:3.12-slim-bookworm`
|
- 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 دستی روی سرور (اختیاری):**
|
**قبل از deploy دستی روی سرور (اختیاری):**
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user