Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions examples/compose/Dockerfile.rspamd

This file was deleted.

4 changes: 0 additions & 4 deletions examples/compose/Dockerfile.unbound

This file was deleted.

4 changes: 2 additions & 2 deletions examples/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

## Usage

~~~
docker compose up
~~~bash
docker compose up --force-recreate
~~~
69 changes: 32 additions & 37 deletions examples/compose/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,53 @@
services:
rspamd:
build:
context: "."
dockerfile: "Dockerfile.rspamd"
container_name: rspamd-compose-rspamd
image: rspamd/rspamd:latest
dns: ${UNBOUND_IP:-192.0.2.254}
depends_on:
- unbound
- redis
environment:
- RSPAMD_DNS_SERVERS=round-robin:192.0.2.254:53
- RSPAMD_REDIS_SERVERS=rspamd-compose-redis
- RSPAMD_REDIS_SERVERS=redis
- RSPAMD_USE_BAYES=1
# - RSPAMD_USE_GREYLIST=1
networks:
- rspamd
ports:
- "127.0.0.1:11332:11332"
- "127.0.0.1:11333:11333"
- "127.0.0.1:11334:11334"
pull_policy: build
# recommended for production
# read_only: true
#- RSPAMD_USE_GREYLIST=1
volumes:
- rspamd-compose-rspamd-dbdir:/var/lib/rspamd
- rspamd-data:/var/lib/rspamd
- ./config/rspamd:/etc/rspamd
# Recommended for production:
#read_only: true

redis:
container_name: rspamd-compose-redis
command: "redis-server --save 60 1 --loglevel warning"
image: "redis:latest"
sysctls:
- net.core.somaxconn=4096
networks:
- rspamd
image: redis:latest
command: redis-server --save 60 1 --loglevel warning
volumes:
- rspamd-compose-redis-data:/data
- redis-data:/data

unbound:
build:
context: "."
dockerfile: "Dockerfile.unbound"
container_name: rspamd-compose-unbound
image: alpinelinux/unbound:latest
networks:
rspamd:
ipv4_address: 192.0.2.254
pull_policy: build
default:
ipv4_address: ${UNBOUND_IP:-192.0.2.254}
# Alternatively use a volume mount for this config if you don't want to
# leverage the config flexibility of ENV `UNBOUND_IP` + `UNBOUND_SUBNET`
configs:
- source: unbound-config
target: /etc/unbound/unbound.conf

configs:
unbound-config:
content: |
server:
access-control: ${UNBOUND_SUBNET:-192.0.2.0/24} allow
do-ip6: no
interface: 0.0.0.0
logfile: ""

networks:
rspamd:
default:
name: unbound-network
ipam:
config:
- subnet: 192.0.2.0/24

- subnet: ${UNBOUND_SUBNET:-192.0.2.0/24}

volumes:
rspamd-compose-redis-data:
rspamd-compose-rspamd-dbdir:
redis-data:
rspamd-data:
8 changes: 0 additions & 8 deletions examples/compose/config/unbound/unbound.conf

This file was deleted.