apogiatzis / docker-compose-livereloader

A docker compose pattern to enable automatic container reloading.
77 stars 11 forks source link

Ignore files / folders #5

Open martintuk opened 4 years ago

martintuk commented 4 years ago

Thanks for this awesome tool!

Any way to ignore files/folders from being watched? like IDE folders and stuff.

Thanks again!

apogiatzis commented 4 years ago

Unfortunately, I don't think is possible at the moment but it is a priority feature to have in the backlog. I don't think it requires much effort to be implemented will try to add it when I get some spare time.

The relevant code is in https://github.com/apogiatzis/docker-compose-livereloader/blob/master/src/reloader.py#L29

aisurfer commented 3 years ago

@apogiatzis Take a glance at this code please https://github.com/stevekrenzel/autoreload/blob/master/autoreload#L12 I tried it and It works well. What about using it as starting point to implement custom observer for livereloader?

aisurfer commented 3 years ago

Also watchdog has option to handle only specified patterns. It looks like several lines of code to change @martintuk https://github.com/gorakhargosh/watchdog/blob/331fd7c2c819663be39bc146e78ce67553f265fa/docs/source/examples/patterns.py#L18

aisurfer commented 3 years ago

Oh, I see PatternMatchingEventHandler is already used livereloader! https://github.com/apogiatzis/docker-compose-livereloader/blob/master/src/reloader.py#L34

Who can add env var for patterns? :slightly_smiling_face: