-
-
Save ahsan518/7df7d1a309eaa944135b6c24ae79eba5 to your computer and use it in GitHub Desktop.
Craton dev start script
This file contains hidden or 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
docker rm -f craton-api || true | |
docker build --pull -t craton-api:latest . | |
docker run -t --name craton-api -p 127.0.0.1:8080:8080 -d craton-api:latest | |
# wait until API server is available by probing it | |
until curl http://127.0.0.1:8080/v1/regions -H "Content-Type: application/json" -H "X-Auth-Token: demo" -H "X-Auth-User: demo" -H "X-Auth-Project: b9f10eca66ac4c279c139d01e65f96b4" | |
do | |
echo "Waiting for API server"; sleep 1 | |
done | |
sleep 1 | |
# run setup | |
python tools/generate_fake_data.py --url http://127.0.0.1:8080/v1 --user demo --project b9f10eca66ac4c279c139d01e65f96b4 --key demo | |
# verify something is now returned | |
curl http://127.0.0.1:8080/v1/regions -H "Content-Type: application/json" -H "X-Auth-Token: demo" -H "X-Auth-User: demo" -H "X-Auth-Project: b9f10eca66ac4c279c139d01e65f96b4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment