From 6954a16fa2c84f7df5bb45de48c380567861d3fc Mon Sep 17 00:00:00 2001 From: mercury Date: Wed, 18 Jun 2025 00:47:48 +0400 Subject: [PATCH] get ip from host --- makefile | 2 +- update/update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 13efc59..25ecf7e 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ b: docker compose build u: # запуск контейнеров - $(eval IP := $(shell curl -s -t 1 2ip.io || curl -s -t 1 ipinfo.io/ip || curl -s -t 1 ifconfig.me)) + $(eval IP := $(shell hostname -I | awk '{print $$1}')) bash ./update/update.sh & touch ./override.env ./docker-compose.override.yml IP=$(IP) VER=$(shell git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate diff --git a/update/update.sh b/update/update.sh index 469ebae..c854032 100755 --- a/update/update.sh +++ b/update/update.sh @@ -38,7 +38,7 @@ do curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "launching the bot"/')" > $pwd/update/key > $pwd/update/curl - IP=$(curl -s -t 1 2ip.io || curl -s -t 1 ipinfo.io/ip || curl -s -t 1 ifconfig.me) VER=$(git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate + IP=$(hostname -I | awk '{print $1}') VER=$(git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate bash $pwd/update/update.sh & exit 0 fi