GitWebhookProxy icon indicating copy to clipboard operation
GitWebhookProxy copied to clipboard

Docker running but requests not passing

Open cescamilla opened this issue 5 years ago • 4 comments

Hi guys,

I'm running the tool in Docker but I don't receive the requests into Jenkins, this is my docker command docker run -p 80:8080 stakater/gitwebhookproxy:v0.2.70 -listen :80 -upstreamURL :8080 -provider gitlab -allowedPaths /project -secret supersecret Note that I'm using -p to map the ports, otherwise the docker ps command shows no port open for this image

then I get this output from docker: 2019/11/09 16:55:39 Stakater Git WebHook Proxy started with provider 'gitlab' 2019/11/09 16:55:39 Listening at: :80

After that I sent a [POST] to :80/project/ that I assume should be logged into the stdout but nothing occurs

If I hit directly :8080/project/ I can run the build successfully

I'm running the docker image in Ubuntu 16.04.6 LTS already tried v0.2.63 but same behaviour is observed

so my questions are: should I expect any http request logged in stdout? should I keep using -p argument?

Thanks in advance! Screen Shot 2019-11-09 at 11 18 41 AM

cescamilla avatar Nov 09 '19 17:11 cescamilla

@cescamilla you still facing this issue or we can close it?

rasheedamir avatar Apr 03 '20 20:04 rasheedamir

Hey just one thing, when using docker you have to map ports, I am using docker-composer and one configuration is missing, look how is my docker composer, btw thanks for this amazing proxy.

jenkinswebhookproxy: image: 'stakater/gitwebhookproxy:latest' ports: - "8080:8080" command: ["-listen", ":8080", "-secret", "test", "-upstreamURL", "http://12.12.12.12", "-allowedPaths", "/github-webhook"] restart: on-failure

pispico avatar Apr 14 '20 20:04 pispico

I've abandoned the project due to this issue, so I would have to check again if the issue persists

cescamilla avatar Apr 14 '20 20:04 cescamilla

@cescamilla in case you want to make some tests my advice would be: -Start the GitWebProxy with docker-composer, you can use mine above, while testing I prefer run composer in foreground to check if incoming connections are working properly(Github-> GitWebHookProxy). After add the parameter ports in docker-compose.yml, I could manage to receive webhooks calls from GitHub, one detail is to not forget the "/" in the end of URL (eg : http://YOURIPHERE:8080/github-webhook/) I added a secret, in Github webhook configuration and use the same secret in the proxy. After doing this I could receive webhooks from GIthub, you can see it in the log from composer

"jenkinswebhookproxy_1 | 2020/04/14 18:51:32 Redirected incomming request '/github-webhook/' to 'http://0.0.0.123/github-webhook/' with Response: '200 OK'"

pispico avatar Apr 14 '20 22:04 pispico