Use get_container_ids method to retrieve container for nginx conf

This commit is contained in:
Jose Diaz-Gonzalez committed 2015-07-11 16:29:25 -04:00
1 parent 379a2e8908
commit 6895dd9936
1 file changed
+7 -2
+7 -2
View File
@@ -49,8 +49,13 @@ case "$1" in
shopt -u nullglob shopt -u nullglob
fi fi
DOKKU_APP_CONTAINER_ID=$(< "$DOKKU_ROOT/$APP/CONTAINER") DOKKU_APP_CIDS=$(get_container_ids $APP)
docker cp "$DOKKU_APP_CONTAINER_ID:/app/nginx.conf" "$APP_NGINX_TEMPLATE" 2> /dev/null || true if [[ -n $DOKKU_APP_CIDS ]]; then
for DOKKU_APP_CID in $DOKKU_APP_CIDS; do
docker cp "$DOKKU_APP_CID:/app/nginx.conf" "$APP_NGINX_TEMPLATE" 2> /dev/null || true
break
done
fi
[[ -f "$DOKKU_ROOT/ENV" ]] && source $DOKKU_ROOT/ENV [[ -f "$DOKKU_ROOT/ENV" ]] && source $DOKKU_ROOT/ENV
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV [[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV