Closed santosral closed 2 years ago
Since the git hooks aren't invoked within the context of the docker container, you'll need to have the overcommit gem installed on your local system.
Also, you'll need to modify the commands used to execute the hooks. Here's an example config:
PreCommit:
CustomRuboCop:
enabled: true
on_warn: fail
command: ['docker-compose', 'exec', '-T', 'app', 'bundle', 'exec', 'rubocop', '.']
CustomReek:
enabled: true
command: ['docker-compose', 'exec', '-T', 'app', 'bundle', 'exec', 'reek']
PrePush:
CustomBrakeman:
enabled: true
command: ['docker-compose', 'exec', '-T', 'app', 'bundle', 'exec', 'brakeman', '--force']
PostCheckout:
ALL:
quiet: true
IndexTags:
enabled: true
Hi Guys,
I hope you're doing well!
I need help or guidance on how I will implement the overcommit if our application is in a Docker Container.
Looking forward to your suggestions/ideas.