How to automatically set up custom hooks for new projects?

I am using GitLab via Docker to provide a pre-configured git repository that will be used by a single user on their local machine. The Git repository is being used primarily to enable automatic loading of data into another server when a user pushes updates to a branch.

I have my custom hooks working fine but I’m not seeing any way to automatically have my hooks added to new projects.

Since this GitLab instance is intended to be more or less self administering and isn’t otherwise a multi-user system, I need to be able to automatically add custom hooks when a new project gets created (which I should be able to do via the REST API using a client-side script or just tell users how to use the Web GUI since creating a new project to serve as the remote of an existing repo is pretty easy).

Since this is Docker I could include a script in the container and run it from the client via Docker but I was hoping that there was something I could statically configure that would just work.





It sounds a bit like you are wanting to apply server hooks, more specifically creating server hooks for all respositories? If so, the links might assist you in getting that setup.