Skip to content

Instantly share code, notes, and snippets.

@anicholson
Created July 27, 2016 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anicholson/2d151c05eae129ba2f0e2c52c3ba37ce to your computer and use it in GitHub Desktop.
Save anicholson/2d151c05eae129ba2f0e2c52c3ba37ce to your computer and use it in GitHub Desktop.
#!/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