fix: use docker rm -f pattern from working claude-dev workflow
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 4m25s
Run Tests / Frontend Tests (push) Has been cancelled
Run Tests / Test Summary (push) Has been cancelled
Run Tests / Backend Tests (push) Has started running

Replicate the proven approach from deploy-claude-dev-dev.yml:
- Use 'docker rm -f' to completely remove the old container
- Let compose create a fresh container from scratch
- Avoids the 'stop then recreate' flow that fails with network errors

This works because Docker Compose handles initial network connection
during 'up' differently than reconnection during recreate. The rm -f
approach succeeds even from the workflow container context.
This commit is contained in:
Gan, Jimmy
2026-04-04 02:05:09 +08:00
parent 2a8e5d4952
commit 2f65691e15
+2 -2
View File
@@ -65,6 +65,6 @@ jobs:
run: |
export DOCKER_API_VERSION=1.43
cd /nas-dashboard
# Stop container, then start with new image (compose will recreate if needed)
docker compose -f docker-compose.dev.yml stop dashboard-dev
# Remove old container completely, then create fresh
docker rm -f nas-dashboard-dev || true
docker compose -f docker-compose.dev.yml up -d --pull never