fix(docker): 启用 pip 超时/重试构建参数并保留 BuildKit 缓存
This commit is contained in:
1 parent
5412ddc7a8
commit
393a8f6858
2 files changed
+13
-1
No files matched your search
@@ -26,6 +26,8 @@ services:
|
||||
PYTHON_BASE_IMAGE: ${PYTHON_BASE_IMAGE:-python:3.12-slim-bookworm}
|
||||
PIP_INDEX_URL: ${PIP_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple}
|
||||
PIP_EXTRA_INDEX_URL: ${PIP_EXTRA_INDEX_URL:-}
|
||||
PIP_TIMEOUT: ${PIP_TIMEOUT:-300}
|
||||
PIP_RETRIES: ${PIP_RETRIES:-15}
|
||||
container_name: hxops-backend
|
||||
restart: always
|
||||
# 与 scripts/deploy_compose.sh 使用的 .env.<ENV_NAME> 对齐(通过 COMPOSE_ENV_BASENAME)
|
||||
@@ -96,6 +98,8 @@ services:
|
||||
PYTHON_BASE_IMAGE: ${PYTHON_BASE_IMAGE:-python:3.12-slim-bookworm}
|
||||
PIP_INDEX_URL: ${PIP_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple}
|
||||
PIP_EXTRA_INDEX_URL: ${PIP_EXTRA_INDEX_URL:-}
|
||||
PIP_TIMEOUT: ${PIP_TIMEOUT:-300}
|
||||
PIP_RETRIES: ${PIP_RETRIES:-15}
|
||||
container_name: hxops-kb-worker
|
||||
restart: always
|
||||
command: ["python", "worker_kb.py"]
|
||||
@@ -151,6 +155,8 @@ services:
|
||||
PYTHON_BASE_IMAGE: ${PYTHON_BASE_IMAGE:-python:3.12-slim-bookworm}
|
||||
PIP_INDEX_URL: ${PIP_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple}
|
||||
PIP_EXTRA_INDEX_URL: ${PIP_EXTRA_INDEX_URL:-}
|
||||
PIP_TIMEOUT: ${PIP_TIMEOUT:-300}
|
||||
PIP_RETRIES: ${PIP_RETRIES:-15}
|
||||
container_name: hxops-schedule-worker
|
||||
restart: always
|
||||
command: ["python", "workers/worker_scheduler.py"]
|
||||
@@ -199,6 +205,8 @@ services:
|
||||
PYTHON_BASE_IMAGE: ${PYTHON_BASE_IMAGE:-python:3.12-slim-bookworm}
|
||||
PIP_INDEX_URL: ${PIP_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple}
|
||||
PIP_EXTRA_INDEX_URL: ${PIP_EXTRA_INDEX_URL:-}
|
||||
PIP_TIMEOUT: ${PIP_TIMEOUT:-300}
|
||||
PIP_RETRIES: ${PIP_RETRIES:-15}
|
||||
container_name: hxops-shipping-worker
|
||||
restart: always
|
||||
command: ["python", "worker_shipping.py"]
|
||||
@@ -249,6 +257,8 @@ services:
|
||||
PYTHON_BASE_IMAGE: ${PYTHON_BASE_IMAGE:-python:3.12-slim-bookworm}
|
||||
PIP_INDEX_URL: ${PIP_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple}
|
||||
PIP_EXTRA_INDEX_URL: ${PIP_EXTRA_INDEX_URL:-}
|
||||
PIP_TIMEOUT: ${PIP_TIMEOUT:-300}
|
||||
PIP_RETRIES: ${PIP_RETRIES:-15}
|
||||
container_name: hxops-transfer-worker
|
||||
restart: always
|
||||
command: ["python", "workers/worker_in_transit_transfer.py"]
|
||||
|
||||
Reference in new issue
Block a user