1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

pg upgrade script: fix ip test

This commit is contained in:
Sylvain 2019-10-22 10:58:07 +02:00
parent cc74b42a2b
commit 719250877e

View File

@ -80,11 +80,12 @@ test_docker_compose()
if docker-compose ps | grep postgres
then
TYPE="DOCKER-COMPOSE"
local container_id, ip
local container_id
container_id=$(docker-compose ps | grep postgre | awk '{print $1}')
local ip
ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$container_id")
if [ "$PG_IP" != "$ip" ]; then
puts "IP address is not matching, exiting..."
echo "IP address is not matching ($PG_IP != $ip), exiting..."
exit 8
fi
fi