Change override configuration

This commit is contained in:
Deon George 2023-05-21 20:51:55 +10:00
parent 06904303e0
commit e8e55ed71c
6 changed files with 8 additions and 27 deletions

View File

@ -8,10 +8,9 @@ RUN if [ -n ${HTTP_PROXY} ] ; then sed -i -e s'/https/http/' /etc/apk/repositori
RUN apk add --no-cache rspamd RUN apk add --no-cache rspamd
ADD rspamd.conf.local.override /etc/rspamd/ COPY override.d /etc/rspamd/override.d
EXPOSE 11332 11333 11334
COPY init /sbin/ COPY init /sbin/
# Starting # Starting
EXPOSE 11332 11333 11334
ENTRYPOINT [ "/sbin/init" ] ENTRYPOINT [ "/sbin/init" ]

3
init
View File

@ -28,9 +28,6 @@ if [ -z "$@" ]; then
[ -n "${NOTON}" ] && echo "No [${CLAMAV}]?" && exit 1 [ -n "${NOTON}" ] && echo "No [${CLAMAV}]?" && exit 1
fi fi
# Set password
[ -n "${RSPAMD_PASSWD}" ] && sed -i -e 's/^#\s*password/ password/' -e "s/@PASSWORD@/${RSPAMD_PASSWD}/" /etc/rspamd/rspamd.conf.local.override
mkdir -p /run/rspamd mkdir -p /run/rspamd
[ -x /usr/bin/rspamd ] && exec /usr/bin/rspamd -u rspamd -g rspamd -c /etc/rspamd/rspamd.conf -f -p /run/rspamd/rspamd.pid & [ -x /usr/bin/rspamd ] && exec /usr/bin/rspamd -u rspamd -g rspamd -c /etc/rspamd/rspamd.conf -f -p /run/rspamd/rspamd.pid &

View File

@ -0,0 +1 @@
bind_socket = "*:11334";

View File

@ -0,0 +1 @@
bind_socket = "*:11333";

View File

@ -0,0 +1,4 @@
bind_socket = "*:11332";
upstream "local" {
self_scan = yes; # Enable self-scan
}

View File

@ -1,21 +0,0 @@
worker "normal" {
bind_socket = "*:11333";
.include "$CONFDIR/worker-normal.inc"
.include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-normal.inc"
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-normal.inc"
}
worker "controller" {
bind_socket = "*:11334";
# password = "@PASSWORD@";
.include "$CONFDIR/worker-controller.inc"
.include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc"
}
worker "rspamd_proxy" {
bind_socket = "*:11332";
.include "$CONFDIR/worker-proxy.inc"
.include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-proxy.inc"
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-proxy.inc"
}