Change override configuration
This commit is contained in:
parent
06904303e0
commit
e8e55ed71c
@ -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
|
||||
|
||||
ADD rspamd.conf.local.override /etc/rspamd/
|
||||
EXPOSE 11332 11333 11334
|
||||
|
||||
COPY override.d /etc/rspamd/override.d
|
||||
COPY init /sbin/
|
||||
|
||||
# Starting
|
||||
EXPOSE 11332 11333 11334
|
||||
ENTRYPOINT [ "/sbin/init" ]
|
||||
|
3
init
3
init
@ -28,9 +28,6 @@ if [ -z "$@" ]; then
|
||||
[ -n "${NOTON}" ] && echo "No [${CLAMAV}]?" && exit 1
|
||||
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
|
||||
[ -x /usr/bin/rspamd ] && exec /usr/bin/rspamd -u rspamd -g rspamd -c /etc/rspamd/rspamd.conf -f -p /run/rspamd/rspamd.pid &
|
||||
|
||||
|
1
override.d/worker-controller.inc
Normal file
1
override.d/worker-controller.inc
Normal file
@ -0,0 +1 @@
|
||||
bind_socket = "*:11334";
|
1
override.d/worker-normal.inc
Normal file
1
override.d/worker-normal.inc
Normal file
@ -0,0 +1 @@
|
||||
bind_socket = "*:11333";
|
4
override.d/worker-proxy.inc
Normal file
4
override.d/worker-proxy.inc
Normal file
@ -0,0 +1,4 @@
|
||||
bind_socket = "*:11332";
|
||||
upstream "local" {
|
||||
self_scan = yes; # Enable self-scan
|
||||
}
|
@ -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"
|
||||
}
|
Loading…
Reference in New Issue
Block a user