Add bind9 and replace pdns

master
andryyy 2017-02-23 16:06:28 +01:00
parent 26906caa07
commit 1c12799091
3 changed files with 49 additions and 13 deletions

View File

View File

@ -0,0 +1,20 @@
acl internal_networks {
127.0.0.0/8;
192.168.0.0/16;
172.16.0.0/12;
10.0.0.0/8;
};
options {
directory "/var/cache/bind";
allow-recursion { internal_networks; };
listen-on { any; };
listen-on-v6 { none; };
pid-file "/var/run/named/named.pid";
allow-transfer { none; };
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
};
include "/etc/bind/bind.keys";

View File

@ -1,19 +1,35 @@
version: '2.1' version: '2.1'
services: services:
pdns-mailcow: # Replaced by better and smaller bind9
image: andryyy/mailcow-dockerized:pdns #pdns-mailcow:
# image: andryyy/mailcow-dockerized:pdns
# depends_on:
# mysql-mailcow:
# condition: service_healthy
# volumes:
# - ./data/conf/pdns/:/etc/powerdns/
# restart: always
# networks:
# mailcow-network:
# ipv4_address: 172.22.1.254
# aliases:
# - pdns
bind9-mailcow:
image: resystit/bind9
command: "named -c /etc/bind/named.conf -g -u named -4"
depends_on: depends_on:
mysql-mailcow: mysql-mailcow:
condition: service_healthy condition: service_healthy
volumes: volumes:
- ./data/conf/pdns/:/etc/powerdns/ - ./data/conf/bind9/named.conf:/etc/bind/named.conf
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
ipv4_address: 172.22.1.254 ipv4_address: 172.22.1.254
aliases: aliases:
- pdns - bind9
mysql-mailcow: mysql-mailcow:
image: mariadb:10.1 image: mariadb:10.1
@ -42,7 +58,7 @@ services:
redis-mailcow: redis-mailcow:
image: redis image: redis
depends_on: depends_on:
- pdns-mailcow - bind9-mailcow
volumes: volumes:
- redis-vol-1:/data/ - redis-vol-1:/data/
restart: always restart: always
@ -78,7 +94,7 @@ services:
image: andryyy/mailcow-dockerized:phpfpm image: andryyy/mailcow-dockerized:phpfpm
command: "php-fpm -d date.timezone=${TZ}" command: "php-fpm -d date.timezone=${TZ}"
depends_on: depends_on:
- pdns-mailcow - bind9-mailcow
volumes: volumes:
- ./data/web:/web:ro - ./data/web:/web:ro
- ./data/conf/rspamd/dynmaps:/dynmaps:ro - ./data/conf/rspamd/dynmaps:/dynmaps:ro
@ -100,7 +116,7 @@ services:
sogo-mailcow: sogo-mailcow:
image: andryyy/mailcow-dockerized:sogo image: andryyy/mailcow-dockerized:sogo
depends_on: depends_on:
- pdns-mailcow - bind9-mailcow
environment: environment:
- DBNAME=${DBNAME} - DBNAME=${DBNAME}
- DBUSER=${DBUSER} - DBUSER=${DBUSER}
@ -122,7 +138,7 @@ services:
rmilter-mailcow: rmilter-mailcow:
image: andryyy/mailcow-dockerized:rmilter image: andryyy/mailcow-dockerized:rmilter
depends_on: depends_on:
- pdns-mailcow - bind9-mailcow
volumes: volumes:
- ./data/conf/rmilter/:/etc/rmilter.conf.d/:ro - ./data/conf/rmilter/:/etc/rmilter.conf.d/:ro
restart: always restart: always
@ -137,7 +153,7 @@ services:
dovecot-mailcow: dovecot-mailcow:
image: andryyy/mailcow-dockerized:dovecot image: andryyy/mailcow-dockerized:dovecot
depends_on: depends_on:
- pdns-mailcow - bind9-mailcow
volumes: volumes:
- ./data/conf/dovecot:/etc/dovecot - ./data/conf/dovecot:/etc/dovecot
- ./data/assets/ssl:/etc/ssl/mail/:ro - ./data/assets/ssl:/etc/ssl/mail/:ro
@ -166,7 +182,7 @@ services:
postfix-mailcow: postfix-mailcow:
image: andryyy/mailcow-dockerized:postfix image: andryyy/mailcow-dockerized:postfix
depends_on: depends_on:
- pdns-mailcow - bind9-mailcow
volumes: volumes:
- ./data/conf/postfix:/opt/postfix/conf - ./data/conf/postfix:/opt/postfix/conf
- ./data/assets/ssl:/etc/ssl/mail/:ro - ./data/assets/ssl:/etc/ssl/mail/:ro
@ -191,7 +207,7 @@ services:
memcached-mailcow: memcached-mailcow:
image: memcached image: memcached
depends_on: depends_on:
- pdns-mailcow - bind9-mailcow
restart: always restart: always
dns: dns:
- 172.22.1.254 - 172.22.1.254
@ -204,7 +220,7 @@ services:
# clamav-mailcow: # clamav-mailcow:
# build: ./data/Dockerfiles/clamav # build: ./data/Dockerfiles/clamav
# depends_on: # depends_on:
# - pdns-mailcow # - bind9-mailcow
# restart: always # restart: always
# dns: # dns:
# - 172.22.1.250 # - 172.22.1.250
@ -231,7 +247,7 @@ services:
- 172.22.1.254 - 172.22.1.254
dns_search: mailcow-network dns_search: mailcow-network
ports: ports:
- "${HTTPS_PORT:-443}:${HTTPS_PORT:-443}" - "${HTTPS_BIND}:${HTTPS_PORT:-443}:${HTTPS_PORT:-443}"
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network: