2019-06-17 07:58:00 +02:00
|
|
|
#!/bin/sh
|
2019-04-11 07:10:51 +02:00
|
|
|
|
|
|
|
if [ "$1" == "setup" ]; then
|
2019-06-06 14:57:00 +02:00
|
|
|
echo "Downloading pre-built docker images"
|
|
|
|
docker-compose -f rails-app/demo.yml pull
|
|
|
|
echo "Setting up the demo Rails app"
|
2019-06-01 08:03:09 +02:00
|
|
|
docker-compose -f rails-app/demo.yml run web rake db:create db:migrate db:seed
|
2019-04-11 07:10:51 +02:00
|
|
|
elif [ "$1" == "run" ]; then
|
2019-06-06 14:57:00 +02:00
|
|
|
echo "Deploying Super Graph and the demo Rails app"
|
2019-04-11 07:10:51 +02:00
|
|
|
docker-compose -f rails-app/demo.yml up
|
2019-06-01 16:53:24 +02:00
|
|
|
elif [ "$1" == "start" ]; then
|
2019-06-06 14:57:00 +02:00
|
|
|
echo "Downloading pre-built docker images"
|
|
|
|
docker-compose -f rails-app/demo.yml pull
|
|
|
|
echo "Setting up and deploying Super Graph and the demo Rails app"
|
2019-06-01 16:53:24 +02:00
|
|
|
docker-compose -f rails-app/demo.yml run web rake db:create db:migrate db:seed
|
|
|
|
docker-compose -f rails-app/demo.yml up
|
2019-06-06 14:57:00 +02:00
|
|
|
elif [ "$1" == "stop" ]; then
|
|
|
|
docker-compose -f rails-app/demo.yml down
|
2019-04-11 07:10:51 +02:00
|
|
|
else
|
2019-06-06 14:57:00 +02:00
|
|
|
echo "./demo [setup|run|start|stop]"
|
2019-04-11 07:10:51 +02:00
|
|
|
fi
|