diff --git a/Dockerfile b/Dockerfile index 0355041..22cf3fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ -FROM rawmind/alpine-monit:5.25-3 +FROM alpine:3.16 RUN apk add --no-cache rspamd rspamd-controller rspamd-proxy rspamd-fuzzy ca-certificates curl RUN mkdir /run/rspamd -COPY monit-service.conf /opt/monit/etc/conf.d COPY start.sh / EXPOSE 11332/tcp 11334/tcp 11335/tcp VOLUME ["/var/lib/rspamd"] + +CMD ["/start.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index cb80749..56974de 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,15 @@ -antispam: - build: . - environment: - PASSWORD: 'apassword' - volume_driver: local - volumes: - - "filter:/var/lib/rspamd" - ports: - - 11334:11334 - - 11333:11333 +version: '2' +services: + antispam: + build: . + environment: + PASSWORD: 'apassword' + volumes: + - "filter:/var/lib/rspamd" + ports: + - 11334:11334 + - 11333:11333 +volumes: + filter: + driver: local diff --git a/monit-service.conf b/monit-service.conf deleted file mode 100644 index 03cd449..0000000 --- a/monit-service.conf +++ /dev/null @@ -1,4 +0,0 @@ -check process rspamd with pidfile /run/rspamd/rspamd.pid - start program = "/start.sh" - stop program = "/bin/bash -c '/bin/kill `/bin/cat /run/rspamd/rspamd.pid`'" - if failed port 11334 type tcp for 10 cycles then exec "/opt/monit/bin/monit quit"