GitLab CE post-commit custom hook not working

post-commit is a client-side hook and you can not implement it on server.

According to Gitlab documentation: http://doc.gitlab.com/ce/hooks/custom_hooks.html, you can implement a server-side custom hook (pre-receive, post-receive, and update) at the server.

Examples of server-side git hooks include pre-receive, post-receive, and update. See Git SCM Server-Side Hooks for more information about each hook type.

If you want to customize a client-side hook, you will need to change the original hook code or put your custom script at client under .git/hooks. Read more here: What are Git hooks?

And here is all about custom hooks: Customizing Git - Git Hooks