fix: add fallback registries and improve deployment reliability
- 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:
@@ -22,7 +22,7 @@ jobs:
|
||||
- name: Warm mirror cache for base images
|
||||
run: |
|
||||
set -u
|
||||
mirror_host="127.0.0.1:5501"
|
||||
mirror_host="100.78.131.124:5501"
|
||||
|
||||
prewarm_base_image() {
|
||||
image_ref="$1"
|
||||
@@ -47,8 +47,14 @@ jobs:
|
||||
|
||||
- name: Build dev image
|
||||
run: |
|
||||
set -e
|
||||
export DOCKER_API_VERSION=1.43
|
||||
DOCKER_BUILDKIT=0 docker build --cache-from nas-dashboard-dev:latest -t nas-dashboard-dev:latest dashboard/
|
||||
if ! DOCKER_BUILDKIT=0 docker build --cache-from nas-dashboard-dev:latest -t nas-dashboard-dev:latest dashboard/; then
|
||||
echo "Build failed. Checking for network issues..."
|
||||
curl -I https://registry.npmmirror.com || echo "npmmirror unreachable"
|
||||
curl -I https://pypi.tuna.tsinghua.edu.cn || echo "Tsinghua PyPI unreachable"
|
||||
exit 1
|
||||
fi
|
||||
- name: Sync runtime compose file
|
||||
run: |
|
||||
mkdir -p /volume1/docker/nas-dashboard
|
||||
|
||||
@@ -54,7 +54,15 @@ jobs:
|
||||
prewarm_base_image "python:3.12-slim"
|
||||
|
||||
- name: Build
|
||||
run: DOCKER_BUILDKIT=0 docker build -t nas-dashboard:latest dashboard/
|
||||
run: |
|
||||
set -e
|
||||
export DOCKER_API_VERSION=1.43
|
||||
if ! DOCKER_BUILDKIT=0 docker build -t nas-dashboard:latest dashboard/; then
|
||||
echo "Build failed. Checking for network issues..."
|
||||
curl -I https://registry.npmmirror.com || echo "npmmirror unreachable"
|
||||
curl -I https://pypi.tuna.tsinghua.edu.cn || echo "Tsinghua PyPI unreachable"
|
||||
exit 1
|
||||
fi
|
||||
- name: Sync runtime compose file
|
||||
run: cp dashboard/docker-compose.yml /nas-dashboard/docker-compose.yml
|
||||
- name: Deploy
|
||||
|
||||
Reference in New Issue
Block a user