File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/plugins/meteor/assets Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,10 @@ APP_PATH=/opt/$APPNAME
5
5
IMAGE=mup-< %= appName.toLowerCase () %>
6
6
START_SCRIPT=$APP_PATH /config/start.sh
7
7
DEPLOY_CHECK_WAIT_TIME=< %= deployCheckWaitTime %>
8
- CONTAINER_IP=$( docker inspect $APPNAME --format " {{.NetworkSettings.IPAddress}}" )
9
- DEPLOY_CHECK_URL=$CONTAINER_IP < %= ` :${deployCheckPort} ` %>
8
+
9
+ # Check if using host network.
10
+ $( docker inspect $APPNAME --format " {{(index .NetworkSettings.Networks)}}" | grep -q ' \[host' )
11
+ HOST_NETWORK=$?
10
12
11
13
cd $APP_PATH
12
14
@@ -52,7 +54,11 @@ while [[ true ]]; do
52
54
53
55
# If the container restarted, the ip address would have changed
54
56
# Get the current ip address right before it is used
55
- CONTAINER_IP=$( docker inspect $APPNAME --format " {{.NetworkSettings.IPAddress}}" )
57
+ if [[ $HOST_NETWORK ]]; then
58
+ CONTAINER_IP=" localhost"
59
+ else
60
+ CONTAINER_IP=$( docker inspect $APPNAME --format " {{.NetworkSettings.IPAddress}}" )
61
+ fi
56
62
57
63
if [[ -z $CONTAINER_IP ]]; then
58
64
echo " Container has no IP Address, likely from it restarting."
You can’t perform that action at this time.
0 commit comments