From 0b05f60b1894d4346a00524d594ff8b0150022b8 Mon Sep 17 00:00:00 2001 From: zeus Date: Sat, 20 Nov 2021 20:30:00 +0200 Subject: [PATCH] fluent --- WriteToMongo/fluent/install-fluent.sh | 15 +++++++++++++++ docker-compose.yml | 24 +++++++++++++++--------- 2 files changed, 30 insertions(+), 9 deletions(-) create mode 100755 WriteToMongo/fluent/install-fluent.sh diff --git a/WriteToMongo/fluent/install-fluent.sh b/WriteToMongo/fluent/install-fluent.sh new file mode 100755 index 0000000..7b79f74 --- /dev/null +++ b/WriteToMongo/fluent/install-fluent.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +BASEDIR=$(dirname $0) +cpwd=$PWD + +echo $BASEDIR + +cd $BASEDIR + +gem install fluent-plugin-mongo \ +gem sources --clear-all \ +rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem + +cp fluent.conf /fluentd/etc/ +cp entrypoint.sh /bin/ diff --git a/docker-compose.yml b/docker-compose.yml index 2d2c3d2..4e3475b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,17 @@ version: "3.3" services: + webclient: + image: hub.swarmlab.io:5480/poc-datacollector-node:latest + container_name: webclient + ports: + - "8085:8080" + networks: + datacollector-net: redisserver: #image: hub.swarmlab.io:5480/playground-redisserver:latest - container_name: redisserver - depends_on: - - writetomongo + #container_name: redisserver + container_name: redis:6.2.6-alpine logging: driver: "fluentd" options: @@ -15,7 +21,7 @@ services: ports: - "6379:6379" networks: - playground-net: + datacollector-net: writetomongo: image: writemongo:latest container_name: fluentd @@ -27,7 +33,7 @@ services: - "24224:24224" - "24224:24224/udp" networks: - playground-net: + datacollector-net: readmongo: container_name: readmongo_service restart: always @@ -47,7 +53,7 @@ services: links: - mongo networks: - playground-net: + datacollector-net: dummy: container_name: dummy_service restart: always @@ -67,7 +73,7 @@ services: links: - mongo networks: - playground-net: + datacollector-net: # ---- fluentd service ---- mongo: container_name: mongo @@ -82,7 +88,7 @@ services: ports: - "27017:27017" networks: - playground-net: + datacollector-net: # volumes: # fluent: @@ -90,4 +96,4 @@ services: # dummy: networks: - playground-net: + datacollector-net: