diff --git a/makefile b/makefile index ad7c79a..dee6458 100644 --- a/makefile +++ b/makefile @@ -2,7 +2,7 @@ b: docker compose build u: # запуск контейнеров bash ./update/update.sh & - IP=$(shell ip -4 addr | sed -ne 's|^.* inet \([^/]*\)/.* scope global.*$$|\1|p' | awk '{print $1}' | head -1) VER=$(shell git describe --tags) docker compose up -d --force-recreate + IP=$(shell curl https://ipinfo.io/ip) VER=$(shell git describe --tags) docker compose up -d --force-recreate d: # остановка контейнеров -kill -9 $(shell cat ./update/update_pid) > /dev/null docker compose down --remove-orphans diff --git a/update/update.sh b/update/update.sh index 3210f69..46f0fe5 100644 --- a/update/update.sh +++ b/update/update.sh @@ -11,7 +11,7 @@ do docker compose down --remove-orphans git reset --hard git pull > ./update/message - IP=$(ip -4 addr | sed -ne 's|^.* inet \([^/]*\)/.* scope global.*$|\1|p' | awk '{print $1}' | head -1) VER=$(git describe --tags) docker compose up -d --force-recreate + IP=$(curl https://ipinfo.io/ip) VER=$(git describe --tags) docker compose up -d --force-recreate bash $pwd/update/update.sh & exit 0 fi