Merge pull request #1452 from SkynetLabs/pj/mail-scanner
Abuse Mail Scanner
This commit is contained in:
commit
75a13a52ac
|
@ -0,0 +1 @@
|
||||||
|
- Add abuse scanner service, activated by adding `u` to `PORTAL_MODULES`
|
5
dc
5
dc
|
@ -40,6 +40,11 @@ for i in $(seq 1 ${#PORTAL_MODULES}); do
|
||||||
if [[ ${PORTAL_MODULES:i-1:1} == "m" ]]; then
|
if [[ ${PORTAL_MODULES:i-1:1} == "m" ]]; then
|
||||||
COMPOSE_FILES+=" -f docker-compose.mongodb.yml"
|
COMPOSE_FILES+=" -f docker-compose.mongodb.yml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# abuse module - alias "u"
|
||||||
|
if [[ ${PORTAL_MODULES:i-1:1} == "u" ]]; then
|
||||||
|
COMPOSE_FILES+=" -f docker-compose.mongodb.yml -f docker-compose.blocker.yml -f docker-compose.abuse.yml"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# override file if exists
|
# override file if exists
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
x-logging: &default-logging
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
abuse:
|
||||||
|
build:
|
||||||
|
context: ./docker/abuse
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: abuse
|
||||||
|
restart: unless-stopped
|
||||||
|
logging: *default-logging
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- ABUSE_LOG_LEVEL=${ABUSE_LOG_LEVEL}
|
||||||
|
- ABUSE_MAILADDRESS=${ABUSE_MAILADDRESS}
|
||||||
|
- ABUSE_MAILBOX=${ABUSE_MAILBOX}
|
||||||
|
- ABUSE_SPONSOR=${ABUSE_SPONSOR}
|
||||||
|
- BLOCKER_HOST=${BLOCKER_HOST}
|
||||||
|
- BLOCKER_PORT=${BLOCKER_PORT}
|
||||||
|
- BLOCKER_AUTH_HEADER=${BLOCKER_AUTH_HEADER}
|
||||||
|
- EMAIL_SERVER=${EMAIL_SERVER}
|
||||||
|
- EMAIL_USERNAME=${EMAIL_USERNAME}
|
||||||
|
- EMAIL_PASSWORD=${EMAIL_PASSWORD}
|
||||||
|
- SKYNET_DB_HOST=${SKYNET_DB_HOST}
|
||||||
|
- SKYNET_DB_PORT=${SKYNET_DB_PORT}
|
||||||
|
- SKYNET_DB_USER=${SKYNET_DB_USER}
|
||||||
|
- SKYNET_DB_PASS=${SKYNET_DB_PASS}
|
||||||
|
networks:
|
||||||
|
shared:
|
||||||
|
ipv4_address: 10.10.10.120
|
||||||
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
- blocker
|
|
@ -0,0 +1,16 @@
|
||||||
|
FROM golang:1.16.7
|
||||||
|
LABEL maintainer="SkynetLabs <devs@siasky.net>"
|
||||||
|
|
||||||
|
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"]
|
|
@ -1,5 +1,5 @@
|
||||||
FROM golang:1.16.7
|
FROM golang:1.16.7
|
||||||
LABEL maintainer="NebulousLabs <devs@nebulous.tech>"
|
LABEL maintainer="SkynetLabs <devs@siasky.net>"
|
||||||
|
|
||||||
ENV GOOS linux
|
ENV GOOS linux
|
||||||
ENV GOARCH amd64
|
ENV GOARCH amd64
|
||||||
|
|
Reference in New Issue