Created
July 27, 2016 01:01
-
-
Save anicholson/2d151c05eae129ba2f0e2c52c3ba37ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wait_until_up () { | |
echo "Waiting for $1 to come up!" | |
until $(curl --output /dev/null --silent --fail "$2"); do | |
printf '.' | |
sleep 1 | |
done | |
} | |
wait_until_up_json () { | |
echo "Waiting for $1 to come up!" | |
until $(curl -H "Accept:application/json" --output /dev/null --silent --fail "$2"); do | |
printf '.' | |
sleep 1 | |
done | |
} | |
docker-compose build | |
docker network create influxdemo_default | |
docker-compose create | |
docker-compose start db event_hub | |
wait_until_up "Event Hub" $(docker-compose port event_hub 4040) | |
docker-compose start rhubarb-web | |
wait_until_up_json "Rhubarb" "$(docker-compose port rhubarb-web 9292)/howdy/" | |
docker-compose start influx-web | |
wait_until_up_json "Influx" "$(docker-compose port influx-web 9000)/howdy/" | |
docker-compose start influx-worker rhubarb-worker | |
docker-compose start rhubarb-listener influx-listener | |
docker-compose ps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment