test8
This commit is contained in:
+5
-3
@@ -45,9 +45,11 @@ steps:
|
||||
docker compose pull web
|
||||
# Останавливаем свой контейнер
|
||||
docker compose down --remove-orphans --timeout 10 2>/dev/null || true
|
||||
# Находим и удаляем ВСЕ контейнеры, занимающие порт 3000
|
||||
docker ps -a -q --filter "publish=3000" | xargs -r docker stop 2>/dev/null || true
|
||||
docker ps -a -q --filter "publish=3000" | xargs -r docker rm -f 2>/dev/null || true
|
||||
# Принудительно удаляем контейнер по имени
|
||||
docker stop na-granicelife 2>/dev/null || true
|
||||
docker rm -f na-granicelife 2>/dev/null || true
|
||||
# Находим и убиваем любой процесс, слушающий порт 3000
|
||||
ss -tlnp 'sport = :3000' 2>/dev/null | grep -oP 'pid=\K[0-9]+' | xargs -r kill -9 2>/dev/null || true
|
||||
sleep 3
|
||||
docker compose up -d
|
||||
docker image prune -f
|
||||
|
||||
Reference in New Issue
Block a user