https://github.com/rkoschmitzky/monokel
A simple but flexible and containerized observer pipeline for filesystem events featured by docker.
https://github.com/rkoschmitzky/monokel
docker docker-compose events pipeline python watchdog
Last synced: 6 months ago
JSON representation
A simple but flexible and containerized observer pipeline for filesystem events featured by docker.
- Host: GitHub
- URL: https://github.com/rkoschmitzky/monokel
- Owner: rkoschmitzky
- License: mit
- Created: 2023-01-25T23:14:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-07T23:30:34.000Z (over 2 years ago)
- Last Synced: 2025-02-14T01:23:50.502Z (8 months ago)
- Topics: docker, docker-compose, events, pipeline, python, watchdog
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Monokel
Monokel sits on top of [Watchdog](https://pythonhosted.org/watchdog/) and exposes an easy way on how to register filesystem event handlers that will eventually run inside a [Docker](https://www.docker.com/) container.## Install
Install and update using [pip](https://pip.pypa.io/en/stable/getting-started/):
```
$ pip install -U monokel
```## Getting Started
### The build step
To run an event loop that observes filesystem events from within the container we have to configure and build the actual docker-compose file first.Monokel provides a build command that will do most of that for you and creates everything the resulting compose file needs to set up the final service.
```
$ monokel build --help
```There are components you can optionally provide and a mandatory one - the python file we call **_the config_**.
### The (python) config
The idea of **_the config_** is to provide a single entry point as a file for the event loop that will eventually run within the docker container. It defines what [Observer](https://pythonhosted.org/watchdog/api.html#module-watchdog.observers) to run and which [EventHandlers](https://pythonhosted.org/watchdog/api.html#module-watchdog.events) to schedule for given paths.As your eventhandlers might become very specific and require external packages it is by intention that you can make use of them from within the config as long as they can be found in PYPI and installed via pip. See [config requirements](https://github.com/rkoschmitzky/monokel/blob/main/README.md#the-config-requirements).
The config file itself can have any name as you can provide the location to the script path.
### The config requirements
TBC...