Last active
March 27, 2017 12:12
-
-
Save ebeigarts/864bcddee4b1290d2b1a2dfbb1653892 to your computer and use it in GitHub Desktop.
dokku-reip.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for APP in `dokku apps | grep -v '=====> My Apps'`; do | |
ID=$(cat /home/dokku/$APP/CONTAINER.web.1) | |
IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $ID) | |
if [ ! -z $IP ]; then | |
echo " ---> $APP: $IP" | |
echo $IP > /home/dokku/$APP/IP.web.1 | |
dokku nginx:build-config $APP | |
fi | |
done | |
for APP in `dokku ls | grep stopped | awk '{ print $1 }' | uniq`; do | |
echo $APP | |
dokku ps:restart $APP | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment