Skip to content

Instantly share code, notes, and snippets.

@miclip
Last active November 19, 2019 04:33
Show Gist options
  • Save miclip/0980339e7fa78c091476ab76cb78e5c3 to your computer and use it in GitHub Desktop.
Save miclip/0980339e7fa78c091476ab76cb78e5c3 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eu
if [ ! -d "concourse-docker" ] ; then
echo "clone docker concourse repo..."
git clone git@github.com:concourse/concourse-docker.git
fi
pushd ./concourse-docker > /dev/null
if [ ! -f "keys/web/tsa_host_key" ] ; then
echo "generate keys for concourse inter-service authentication..."
./keys/generate
fi
echo "starting concourse..."
docker-compose up -d
popd > /dev/null
sleep 10
status_code=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8080)
if [[ "$status_code" -ne 200 ]] ; then
echo "concourse test status code is $status_code"
exit 1
fi
echo "concourse is running, user:test/test"
echo "*************************************************************************"
echo "* - stop or start run ./concourse-docker/docker-compose stop|start *"
echo "* - destroy run ./concourse-docker/docker-compose down *"
echo "*************************************************************************"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment