diff --git a/.gitignore b/.gitignore index 7d5e4d8..ab002a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -zones/* +.env *.pyc +zones/* diff --git a/Dockerfile b/Dockerfile index 9b591c7..61f3503 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,8 +16,5 @@ EXPOSE 53/udp 53 VOLUME ["/src/zones"] -HEALTHCHECK --interval=30s --timeout=5s \ - CMD dig +short @localhost health.server.test TXT || exit 1 - ENTRYPOINT ["/src/docker-entrypoint.sh"] CMD ["named", "-g"] diff --git a/Makefile b/Makefile index 5699231..e2baa6c 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,6 @@ container: docker build --no-cache --pull -t luzifer/dns . bash -eo pipefail -c '[ "$(REF)" == "refs/heads/master" ] && docker push luzifer/dns || true' -check_zones: .venv - ./.venv/bin/python3 checkZonefile.py - .venv: virtualenv --python=python3 .venv ./.venv/bin/pip3 install -r requirements.txt @@ -15,4 +12,4 @@ alpine-prereq: apk --no-cache add make python3 pip3 install virtualenv -.PHONY: check_zones container +.PHONY: container diff --git a/checkZonefile.py b/checkZonefile.py deleted file mode 100644 index 0d85cc3..0000000 --- a/checkZonefile.py +++ /dev/null @@ -1,194 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import generateZonefiles as generator - -import re -import sys -import yaml - -MATCH_FQDN = '(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(? 0 %} -{% for mailserver, weight in mailserver | dictsort -%} -{{ zone }}. {{ ttl }} IN MX {{ weight }} {{ mailserver }} -{% endfor -%} -{%- endif %} -{% for entry in entries -%} -{{ entry.name }} {{ entry.ttl | default(ttl) }} {{ entry.class | default('IN') }} {{ entry.type }} {% if entry.weight %}{{ entry.weight }} {% endif %}{{ entry.data }} -{% endfor -%} diff --git a/zones.yml b/zones.yml deleted file mode 100644 index 3817a96..0000000 --- a/zones.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- - -soa: - auth_ns: ns1.kserver.biz. - contact: dns.ahlers.me. - refresh: 7200 - retry: 900 - expire: 1209600 - ttl: 86400 - -mailserver_sets: - -nameserver: - - ns1.kserver.biz. - - ns2.kserver.biz. - - ns3.kserver.biz. - -zones: - server.test: - entries: - - name: health - type: TXT - records: - - "OK" -...