https://github.com/matthieume/minio-webhook
Webhooks for Min.io minio
https://github.com/matthieume/minio-webhook
assets-management minio s3 thumbnail-generator webhook
Last synced: 5 months ago
JSON representation
Webhooks for Min.io minio
- Host: GitHub
- URL: https://github.com/matthieume/minio-webhook
- Owner: matthieume
- License: mit
- Created: 2019-09-10T18:35:25.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-10T18:50:25.000Z (about 6 years ago)
- Last Synced: 2024-11-13T04:52:49.848Z (11 months ago)
- Topics: assets-management, minio, s3, thumbnail-generator, webhook
- Language: C#
- Homepage:
- Size: 17.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
# Minio-Webhook
Minio-Webhook is a platform to manage your [Minio](https://min.io/)'s webhooks.
The current version is providing thumbnail generation.
## Quick start
Clone project and run
```sh
dotnet publish -c Release
docker-compose up -d
```Task queue dashboard is available here http://localhost:9002/hangfire
## Configuration
Update `appsettings.json` according to you needs:```
"MinioSettings": {
"Endpoint": "assets:9000",
"AccessKey": "Use appsettings.production.json",
"SecretKey": "Use appsettings.production.json",
"WebhooksOptions": {
"ThumbnailGeneratorWebhook": {
"Buckets": [ "img" ],
"ThumbnailSize": [ 100, 250, 500, 1024 ]
}
}
```If you are not using the default docker configuration, or you are exposing the API somewhere else, you must edit `.docker/assets/.minio.sys/config.json` and change the webhook endpoint:
```
"webhook": {
"1": {
"enable": true,
"endpoint": "http://webhooks:5000/api/Webhook",
"queueDir": "/home/queue",
"queueLimit": 10000
}
}
```## Development
Change webhook endpoint in `.docker/assets/.minio.sys/config.json` to:
```
"endpoint": "http://host.docker.internal:5000/api/Webhook",
```Change `appsettings.json` to point to your minio local instance.
```
"MinioSettings": {
"Endpoint": "localhost:9001",
"AccessKey": "devkey",
"SecretKey": "devsecret",
}
```Then run only the minio instance from the docker file:
```sh
docker-compose down && docker-compose up -d assets
```
### Adding new hooks
Create a new service class in `Services/Webhooks` implementing `IWebhook`, use ThumbnailGeneratorWebHook as a template.Then register the service in `Startup.ConfigureServices`:
```
services.AddSingleton();
```