fix: 修复容器报错问题

This commit is contained in:
Daniel
2026-04-07 17:15:09 +08:00
parent 30c6896537
commit c29ff1a54b

View File

@@ -19,6 +19,13 @@ if ! docker compose version >/dev/null 2>&1; then
exit 1 exit 1
fi fi
CONTAINER_NAME="video-worker-center-dispatch"
EXISTING_ID="$(docker ps -aq -f "name=^${CONTAINER_NAME}$" || true)"
if [ -n "$EXISTING_ID" ]; then
echo "[WARN] found existing container ${CONTAINER_NAME} (${EXISTING_ID}), removing it"
docker rm -f "$EXISTING_ID" >/dev/null 2>&1 || true
fi
PORT=$(grep '^EDGE_DISPATCH_PORT=' .env | tail -n1 | cut -d'=' -f2- || true) PORT=$(grep '^EDGE_DISPATCH_PORT=' .env | tail -n1 | cut -d'=' -f2- || true)
PORT="${PORT:-8060}" PORT="${PORT:-8060}"