#!/bin/bash -ex
export DOCKER_HOST=dkmanager:2376
DKREGISTRY=dkregistry.xai-corp.net:5000

#docker login -u richard -p $DKREGISTRY_PASS $DKREGISTRY
< ./password.txt docker login --username richard --password-stdin $DKREGISTRY

#(cd nextcloud && docker-compose -f docker-compose-mono.yml build) &
./nextcloud/build.sh &
(cd sslproxy && docker-compose -f docker-compose.yml build) &
(cd letsencrypt && docker-compose -f docker-compose.yml build) &
(cd prometheus && docker-compose -f docker-compose.yml build) &

wait

#docker push dkregistry.xai-corp.net:5000/xaicorp/nextcloud:15 &
docker push dkregistry.xai-corp.net:5000/sslproxy:2.1 &
docker push dkregistry.xai-corp.net:5000/letsencrypt:latest &
docker push dkregistry.xai-corp.net:5000/xaicorp/prometheus:latest &

wait
