mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-21 01:27:01 +02:00
add benthos
This commit is contained in:
parent
00801ff5c7
commit
e5121a0ed1
@ -298,6 +298,7 @@ A collection of delicious docker recipes.
|
||||
- [x] ghcr.io/linuxserver/airsonic :musical_note:
|
||||
- [x] archivebox/archivebox
|
||||
- [x] docker.bintray.io/jfrog/artifactory-oss
|
||||
- [x] jeffail/benthos
|
||||
- [x] tutum/builder
|
||||
- [x] browserless/chrome
|
||||
- [x] certbot
|
||||
|
55
benthos/README.md
Normal file
55
benthos/README.md
Normal file
@ -0,0 +1,55 @@
|
||||
benthos
|
||||
=======
|
||||
|
||||
![](https://github.com/Jeffail/benthos/raw/master/icon.png)
|
||||
|
||||
[Benthos][1] is a high performance and resilient stream processor, able to
|
||||
connect various sources and sinks in a range of brokering patterns and perform
|
||||
hydration, enrichments, transformations and filters on payloads.
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
services:
|
||||
benthos:
|
||||
image: jeffail/benthos
|
||||
command: -c /etc/benthos/config.yaml
|
||||
ports:
|
||||
- "4195:4195"
|
||||
volumes:
|
||||
- ./data:/etc/benthos
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
## config.yaml
|
||||
|
||||
```yaml
|
||||
input:
|
||||
mqtt:
|
||||
urls:
|
||||
- tcp://broker.hivemq.com:1883
|
||||
topics:
|
||||
- easypi
|
||||
|
||||
pipeline:
|
||||
processors:
|
||||
- jq:
|
||||
query: .
|
||||
- http:
|
||||
url: https://httpbin.org/post
|
||||
|
||||
output:
|
||||
stdout:
|
||||
codec: lines
|
||||
```
|
||||
|
||||
## up and running
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
$ docker-compose logs -f
|
||||
$ mosquitto_pub -h broker.hivemq.com -p 1883 -t easypi -m '{"hello":"world"}'
|
||||
```
|
||||
|
||||
[1]: https://github.com/Jeffail/benthos
|
18
benthos/data/config.yaml
Normal file
18
benthos/data/config.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
input:
|
||||
mqtt:
|
||||
urls:
|
||||
- tcp://broker.hivemq.com:1883
|
||||
topics:
|
||||
- easypi
|
||||
|
||||
pipeline:
|
||||
processors:
|
||||
- jq:
|
||||
query: .
|
||||
- http:
|
||||
url: https://httpbin.org/post
|
||||
verb: POST
|
||||
|
||||
output:
|
||||
stdout:
|
||||
codec: lines
|
2
benthos/data/output.txt
Normal file
2
benthos/data/output.txt
Normal file
@ -0,0 +1,2 @@
|
||||
{"hello":"world"}
|
||||
{"foo":"bar"}
|
10
benthos/docker-compose.yml
Normal file
10
benthos/docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
benthos:
|
||||
image: jeffail/benthos
|
||||
command: -c /etc/benthos/config.yaml
|
||||
ports:
|
||||
- "4195:4195"
|
||||
volumes:
|
||||
- ./data:/etc/benthos
|
||||
restart: unless-stopped
|
Loading…
Reference in New Issue
Block a user