#!/bin/bash BUILD=$1 if [ -z $BUILD ]; then BUILD=1; fi PUSH=$2 if [ -z $PUSH ]; then PUSH=0; fi # Build images if [ $BUILD -eq 1 ]; then docker-compose build fi # Push images if [ $PUSH -eq 1 ]; then source .env # for $ARCH for i in `ls images`; do docker push bingen/${ARCH}-${i} done; fi # Start services docker-compose -p dhs up -d echo Wait for services to start sleep 60 # ##### Add users to LDAP ###### # ./add_users.sh # Add local domains ./add_dns_entries.sh # Wait for Nextcloud echo "Waiting for Nextcloud" NC_UP=0 while [ $NC_UP -eq 0 ]; do container=$(docker ps | grep '${SERVICE}' | cut -f1 -d" ") #echo Container=$container if [ -z $container ]; then echo "Qué me estás container?!"; continue; fi curl http://${host}/index.nginx-debian.html 2>/dev/null | grep title | grep Welcome 1>/dev/null; NC_UP=$((1 - $?)); done; ./nextcloud_apps_after_update.sh