2019-10-03 04:49:58 +02:00
|
|
|
#!/bin/bash
|
2019-04-11 07:10:51 +02:00
|
|
|
|
2019-07-30 07:38:05 +02:00
|
|
|
if [ "$1" == "start" ]; then
|
2019-06-06 14:57:00 +02:00
|
|
|
echo "Downloading pre-built docker images"
|
2019-10-03 04:49:58 +02:00
|
|
|
docker-compose -f examples/rails-app/demo.yml pull
|
2019-06-06 14:57:00 +02:00
|
|
|
echo "Setting up and deploying Super Graph and the demo Rails app"
|
2019-10-03 04:49:58 +02:00
|
|
|
docker-compose -f examples/rails-app/demo.yml run rails_app rake db:create db:migrate db:seed
|
|
|
|
docker-compose -f examples/rails-app/demo.yml up
|
2019-06-06 14:57:00 +02:00
|
|
|
elif [ "$1" == "stop" ]; then
|
2019-10-03 04:49:58 +02:00
|
|
|
docker-compose -f examples/rails-app/demo.yml down
|
2019-04-11 07:10:51 +02:00
|
|
|
else
|
2019-07-30 07:38:05 +02:00
|
|
|
echo "./demo [start|stop]"
|
2019-10-03 04:49:58 +02:00
|
|
|
fi
|