gitlab-dashboard-proxy
v1.2.3
Published
An event based cache for gitlab dashboards using webhooks.
Downloads
18
Maintainers
Readme
gitlab-dashboard-proxy
An event based cache for gitlab dashboards using webhooks.
Install
Using Yarn:
yarn global add gitlab-dashboard-proxy
Using Docker:
docker pull nadavami/gitlab-dashboard-proxy
Usage
- Start gitlab-dashboard-proxy using Yarn:
export GITLAB_URL=https://gitlab.com
export PORT=8080 # Optional. Default is 3000
gitlab-dashboard-proxy
- Start gitlab-dashboard-proxy using Docker:
docker run -d -e GITLAB_URL=https://gitlab.com -p 8080:3000 nadavami/gitlab-dashboard-proxy
- Configure your dashboard to use
<gitlab-dashboard-proxy url>/gitlab
instead of GitLab's url. - Configure your GitLab project or group to trigger a pipeline event webhook on
<gitlab-dashboard-proxy url>/update
. - That's it!
Routes
GET /gitlab
-> Proxies connections to GitLab and caches requests for projectsPOST /update
-> Clears a single project's cache based on a GitLab pipeline webhookGET /cache
-> Returns a JSON object containing cached pathsGET /cache/clear
-> Clears the entire cache
Debugging
Debug logs can be switched on by setting the environment variable DEBUG=gitlab-dashboard-proxy
.
Q&A
When would I need this?
We DDoSed our GitLab instance after having many dashboards monitor many pipelines. Just adding a single display that polls every 10s visibly increases server load. This project provides an event based cache to shield GitLab from the large number of API requests.