Sample gitlab webhook API
411
This is a simple web API built with Flask to illustrate how to use the GitLab webhook. The API only responds to POST requests on /webhook and logs the received payload.
/webhookBuild your Docker image and run it with the following command:
docker run -d -p 9000:9000 --name gitlab-webhook-listener <your_image_name>
This command starts the container, mapping port 9000 of your host to port 9000 of the container.
To continuously follow the logs from the running container, use:
docker logs -f gitlab-webhook-listener
app.py: Contains the Flask application and webhook endpoint.Dockerfile: Specifies how to build the Docker image.requirements.txt: Lists the Python dependencies for the project.Content type
Image
Digest
sha256:0d3413b81…
Size
20.6 MB
Last updated
over 1 year ago
docker pull dimjones/gitlab-webhook-api