From 4ad119835c5d094737c13626789d50de1952aa14 Mon Sep 17 00:00:00 2001 From: Andy Bunce Date: Sun, 1 May 2022 18:36:03 +0100 Subject: [PATCH] [add] ntopng --- ntopng/data/.gitignore | 8 +++++++ ntopng/docker-compose.yaml | 21 ++++++++++++++++++ ntopng/ntop/Dockerfile | 13 +++++++++++ sonarqube/docker-compose.yml | 42 ------------------------------------ sonarqube/readme.md | 3 --- 5 files changed, 42 insertions(+), 45 deletions(-) create mode 100644 ntopng/data/.gitignore create mode 100644 ntopng/docker-compose.yaml create mode 100644 ntopng/ntop/Dockerfile delete mode 100644 sonarqube/docker-compose.yml delete mode 100644 sonarqube/readme.md diff --git a/ntopng/data/.gitignore b/ntopng/data/.gitignore new file mode 100644 index 0000000..1e04ba0 --- /dev/null +++ b/ntopng/data/.gitignore @@ -0,0 +1,8 @@ +# .gitignore sample +################### + +# Ignore all files in this dir... +* + +# ... except for this one. +!.gitignore diff --git a/ntopng/docker-compose.yaml b/ntopng/docker-compose.yaml new file mode 100644 index 0000000..1593ea0 --- /dev/null +++ b/ntopng/docker-compose.yaml @@ -0,0 +1,21 @@ +version: '3' + +services: + redis: + image: redis:alpine + command: --save 900 1 + volumes: + - ./data/redis:/data + restart: on-failure:5 + network_mode: "host" + ntopng: + build: + context: ntop + dockerfile: Dockerfile + command: ntopng -r localhost:6379 -d /ntopngcustom + volumes: + - ./data/ntopng:/var/lib/ntopng + restart: on-failure:5 + network_mode: "host" + depends_on: + - redis \ No newline at end of file diff --git a/ntopng/ntop/Dockerfile b/ntopng/ntop/Dockerfile new file mode 100644 index 0000000..0241931 --- /dev/null +++ b/ntopng/ntop/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:focal + +RUN apt-get update && apt-get -y upgrade \ + && echo "8 48" | apt-get install -y software-properties-common wget curl \ + && add-apt-repository universe \ + && wget https://packages.ntop.org/apt-stable/20.04/all/apt-ntop-stable.deb \ + && apt install -y ./apt-ntop-stable.deb \ + && apt-get install -y ntopng \ + && systemctl enable ntopng + +RUN mkdir /ntopngcustom \ + && chmod 777 /ntopngcustom + \ No newline at end of file diff --git a/sonarqube/docker-compose.yml b/sonarqube/docker-compose.yml deleted file mode 100644 index 245166f..0000000 --- a/sonarqube/docker-compose.yml +++ /dev/null @@ -1,42 +0,0 @@ -version: "3" - -services: - sonarqube: - image: sonarqube - expose: - - 9005 - ports: - - "9005:9000" - networks: - - sonarnet - environment: - - SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar - - SONARQUBE_JDBC_USERNAME=sonar - - SONARQUBE_JDBC_PASSWORD=sonar - volumes: - - sonarqube_conf:/opt/sonarqube/conf - - sonarqube_data:/opt/sonarqube/data - - sonarqube_extensions:/opt/sonarqube/extensions - - sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins - - db: - image: postgres - networks: - - sonarnet - environment: - - POSTGRES_USER=sonar - - POSTGRES_PASSWORD=sonar - volumes: - - postgresql:/var/lib/postgresql - - postgresql_data:/var/lib/postgresql/data - -networks: - sonarnet: - -volumes: - sonarqube_conf: - sonarqube_data: - sonarqube_extensions: - sonarqube_bundled-plugins: - postgresql: - postgresql_data: \ No newline at end of file diff --git a/sonarqube/readme.md b/sonarqube/readme.md deleted file mode 100644 index 982f8d8..0000000 --- a/sonarqube/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -requires - -sysctl vm.max_map_count=262144 \ No newline at end of file