blob: af24717a6482201e617ec52b24bb8a424b821f3e [file] [log] [blame]
BjornMagnussonXAc4c62f22019-03-06 14:11:57 +00001#!/usr/bin/env bash
2
3docker-compose up -d
4
5
6DFC=$(docker ps -a -q --filter="name=dfc")
7
8# Wait for initialization of Docker contaienr for DFC
9for i in {1..10}; do
10if [ $(docker inspect --format '{{ .State.Running }}' $DFC) ]
11then
12 echo "DFC Container Running"
13 break
14else
15 echo sleep $i
16 sleep $i
17fi
18done
19
20#Wait for initialization of the DFC service
21for i in {1..10}; do
22if [ $(curl -so /dev/null -w '%{response_code}' http://localhost:8100/heartbeat ) -eq 200 ]
23then
24 echo "DFC Service running"
25 break
26else
27 echo sleep $i
28 sleep $i
29fi
30done
31