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