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:
parent
cc74b42a2b
commit
719250877e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user