fix: 修复容器报错问题
This commit is contained in:
@@ -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}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user