From 52e1ffbc0a1f360360f1d2e3d62bd55d021cb10c Mon Sep 17 00:00:00 2001 From: PJ Date: Mon, 13 Dec 2021 10:42:46 +0100 Subject: [PATCH] Add abuse scanner module --- dc | 5 +++++ docker-compose.abuse.yml | 26 ++++++++++++++++++++++++++ docker/abuse/Dockerfile | 16 ++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 docker-compose.abuse.yml create mode 100644 docker/abuse/Dockerfile diff --git a/dc b/dc index c041317a..fd37207f 100755 --- a/dc +++ b/dc @@ -13,6 +13,11 @@ for i in $(seq 1 ${#PORTAL_MODULES}); do COMPOSE_FILES+=" -f docker-compose.mongodb.yml -f docker-compose.accounts.yml" fi + # abuse module - alias "c" + if [[ ${PORTAL_MODULES:i-1:1} == "c" ]]; then + COMPOSE_FILES+=" -f docker-compose.abuse.yml" + fi + # blocker module - alias "b" if [[ ${PORTAL_MODULES:i-1:1} == "b" ]]; then COMPOSE_FILES+=" -f docker-compose.blocker.yml" diff --git a/docker-compose.abuse.yml b/docker-compose.abuse.yml new file mode 100644 index 00000000..57936253 --- /dev/null +++ b/docker-compose.abuse.yml @@ -0,0 +1,26 @@ +version: "3.7" + +x-logging: &default-logging + driver: json-file + options: + max-size: "10m" + max-file: "3" + +services: + blocker: + build: + context: ./docker/abuse + dockerfile: Dockerfile + container_name: abuse + restart: unless-stopped + logging: *default-logging + env_file: + - .env + environment: + - BLOCKER_API_URL=http://blocker + networks: + shared: + ipv4_address: 10.10.10.110 + depends_on: + - mongo + - blocker diff --git a/docker/abuse/Dockerfile b/docker/abuse/Dockerfile new file mode 100644 index 00000000..bccd2ed3 --- /dev/null +++ b/docker/abuse/Dockerfile @@ -0,0 +1,16 @@ +FROM golang:1.16.7 +LABEL maintainer="NebulousLabs " + +ENV GOOS linux +ENV GOARCH amd64 + +ARG branch=main + +WORKDIR /root + +RUN git clone --single-branch --branch ${branch} https://github.com/SkynetLabs/abuse-scanner.git && \ + cd abuse-scanner && \ + go mod download && \ + make release + +ENTRYPOINT ["abuse-scanner"]