Add abuse scanner module

This commit is contained in:
PJ 2021-12-13 10:42:46 +01:00
parent 6e642a8c2b
commit 52e1ffbc0a
No known key found for this signature in database
GPG Key ID: F345964979FA8971
3 changed files with 47 additions and 0 deletions

5
dc
View File

@ -13,6 +13,11 @@ for i in $(seq 1 ${#PORTAL_MODULES}); do
COMPOSE_FILES+=" -f docker-compose.mongodb.yml -f docker-compose.accounts.yml" COMPOSE_FILES+=" -f docker-compose.mongodb.yml -f docker-compose.accounts.yml"
fi 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" # blocker module - alias "b"
if [[ ${PORTAL_MODULES:i-1:1} == "b" ]]; then if [[ ${PORTAL_MODULES:i-1:1} == "b" ]]; then
COMPOSE_FILES+=" -f docker-compose.blocker.yml" COMPOSE_FILES+=" -f docker-compose.blocker.yml"

26
docker-compose.abuse.yml Normal file
View File

@ -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

16
docker/abuse/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM golang:1.16.7
LABEL maintainer="NebulousLabs <devs@nebulous.tech>"
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"]