diff --git a/bin/bash b/bin/bash new file mode 100755 index 0000000..7257fe4 --- /dev/null +++ b/bin/bash @@ -0,0 +1,16 @@ +#!/bin/sh + + +### +# Simple script to get a shell into the container. +### +sudo docker run \ + --name webhookd \ + --rm \ + --env-file="./etc/env.conf" \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /home/nicolas/.ssh/deploy_rsa:/root/.ssh/id_rsa \ + -it \ + --entrypoint="/bin/bash" \ + ncarlier/webhookd \ + -c /bin/bash diff --git a/bin/start b/bin/start new file mode 100755 index 0000000..931db76 --- /dev/null +++ b/bin/start @@ -0,0 +1,11 @@ +#!/bin/sh +#-v ~/.ssh/deploy_rsa:/var/opt/webhookd/deploy_rsa \ +sudo docker run \ + --name webhookd \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /home/nicolas/.ssh/deploy_rsa:/root/.ssh/id_rsa \ + -it --rm \ + -P \ + --env-file ./etc/env.conf \ + ncarlier/webhookd + diff --git a/test b/bin/test similarity index 66% rename from test rename to bin/test index 4bb0dc1..808f737 100755 --- a/test +++ b/bin/test @@ -1,21 +1,24 @@ #!/bin/sh +IP=`sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' webhookd` + echo "Test bad URL" curl -H "Content-Type: application/json" \ --data @assets/bitbucket.json \ - http://localhost:8080/bad/action + http://$IP:8080/bad/action echo "Test Bitbucket hook" curl -H "Content-Type: application/json" \ --data @assets/bitbucket.json \ - http://localhost:8080/bitbucket/echo + http://$IP:8080/bitbucket/echo echo "Test Github hook" curl -H "Content-Type: application/json" \ --data @assets/github.json \ - http://localhost:8080/github/echo + http://$IP:8080/github/echo echo "Test Docker hook" curl -H "Content-Type: application/json" \ --data @assets/docker.json \ - http://localhost:8080/docker/echo + http://$IP:8080/docker/echo + diff --git a/start b/start deleted file mode 100755 index 2b2dca1..0000000 --- a/start +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -export APP_NOTIFIER="http" -export APP_HTTP_NOTIFIER_URL="http://requestb.in/v9b229v9" - -go run src/main.go -