TheCatLady/docker-webhook

jq?

Octothorn opened this issue · 6 comments

jq?

Hi @Octothorn!

So the goal here is to keep the image as minimal as possible.

But, could you explain your use case? Maybe there is something I'm not considering, but adnanh/webhook can already parse JSON payloads: https://github.com/adnanh/webhook#multipart-form-data

If you do need jq, there are currently have two options:

Hi TheCatLady, glad to make your acquaintance!

Currently I am taking in plex multipart form data, matching it to media.play and sending it to three more internal webhooks. Each of these match on the Metadata.type key so I can send music, movies, and tv data to webhooks another app in my ecosystem for further processing and enrichment, eventually being recorded in a Neo4j database.

This takes four webhooks and four shell scripts, and I want to reduce it to one of each.

I figure I can avoid the extra complexity, redundant messaging activity, and webhooks if my shell script can perform the work of those loopback webhooks. Grep may do this kind of ok and unreliably, and you have grep in your image last I checked. However I think jq is required for what I want to do.

I now have a very simple Dockerfile to add jq to the image you develop whenever I get your :latest. I am happy with this so far as a solution, and I expect it will be fine. I will see how I go with simplifying my process here with jq in the modded image when I have some time for it.

Many thanks, and all the best to you and your cats!

Marking this issue as stale because it has had no activity in the last 60 days. If there is no new activity in the next 7 days, the issue will be automatically closed.

Marking this issue as stale because it has had no activity in the last 60 days. If there is no new activity in the next 7 days, the issue will be automatically closed.

Hi @Octothorn, I decided to add jq to the image and approved #128. It will be merged and built shortly.

Thanks for getting in touch @TheCatLady. I look forward to the change.

FYI the Dockerfile I have been using has worked perfectly and has served my purposes without any issues since we last spoke, but it will be nice to be able to use your image natively.

All the best!