container-server/services/fail2ban/docker-compose.yml
Carsten Sprung 7f5755b537 fix: Remove hostnames from docker-compose configs (#76)
- [x] This fixes services being not reachable from inside their own container
- [x] Container name must be different to URL hostname

Reviewed-on: #76
2024-09-30 17:27:30 +02:00

30 lines
1 KiB
YAML

version: '3.7'
# https://docs.linuxserver.io/images/docker-fail2ban/
# https://github.com/linuxserver/fail2ban-confs/blob/master/README.md
services:
fail2ban:
image: lscr.io/linuxserver/fail2ban
container_name: fail2ban
restart: "${RESTART:-no}"
domainname: ${BASE_DOMAIN}
cap_add:
- NET_ADMIN
- NET_RAW
network_mode: host
environment:
- PUID=0
- PGID=0
- TZ=${TIMEZONE}
- VERBOSITY=-v
volumes:
- ${BASE_DIR:-/srv}/fail2ban:/config
- ./fail2ban/fail2ban.local:/config/fail2ban/fail2ban.local:ro
- ./fail2ban/jail.local:/config/fail2ban/jail.local:ro
- ./fail2ban/uptimerobot.local:/config/fail2ban/uptimerobot.local:ro
- ./fail2ban/action.d/iptables.local:/config/fail2ban/action.d/iptables.local:ro
- /var/log:/var/log:ro
- ${BASE_DIR:-/srv}/forgejo/data/gitea/log:/remotelogs/gitea:ro
- ${BASE_DIR:-/srv}/vaultwarden/data/logs:/remotelogs/vaultwarden:ro
- ${BASE_DIR:-/srv}/mail/mail-logs:/remotelogs/mail:ro