feat: bind9
This commit is contained in:
parent
58ba2ad8df
commit
36a5b40cef
2
bind9/.env
Normal file
2
bind9/.env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
BASE_URL=dns.
|
||||||
|
EMAIL=
|
8
bind9/Dockerfile
Normal file
8
bind9/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM docker.io/debian:12-slim
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
bind9 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
COPY bind/ /etc/bind/
|
||||||
|
VOLUME /cache/
|
||||||
|
CMD ["/usr/sbin/named", "-f"]
|
11
bind9/bind/named.conf
Normal file
11
bind9/bind/named.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// This is the primary configuration file for the BIND DNS server named.
|
||||||
|
//
|
||||||
|
// Please read /usr/share/doc/bind9/README.Debian for information on the
|
||||||
|
// structure of BIND configuration files in Debian, *BEFORE* you customize
|
||||||
|
// this configuration file.
|
||||||
|
//
|
||||||
|
// If you are just adding zones, please do that in /etc/bind/named.conf.local
|
||||||
|
|
||||||
|
include "/etc/bind/named.conf.options";
|
||||||
|
include "/etc/bind/named.conf.local";
|
||||||
|
include "/etc/bind/named.conf.default-zones";
|
7
bind9/bind/named.conf.local
Normal file
7
bind9/bind/named.conf.local
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//
|
||||||
|
// Do any local configuration here
|
||||||
|
//
|
||||||
|
|
||||||
|
// Consider adding the 1918 zones here, if they are not used in your
|
||||||
|
// organization
|
||||||
|
//include "/etc/bind/zones.rfc1918";
|
32
bind9/bind/named.conf.options
Normal file
32
bind9/bind/named.conf.options
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
http local-http-server {
|
||||||
|
endpoints { "/dns-query"; };
|
||||||
|
};
|
||||||
|
|
||||||
|
options {
|
||||||
|
directory "/cache";
|
||||||
|
recursion yes;
|
||||||
|
allow-recursion { any; };
|
||||||
|
listen-on port 53 { any; };
|
||||||
|
http-port 80;
|
||||||
|
|
||||||
|
// If there is a firewall between you and nameservers you want
|
||||||
|
// to talk to, you may need to fix the firewall to allow multiple
|
||||||
|
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
|
||||||
|
|
||||||
|
// If your ISP provided one or more IP addresses for stable
|
||||||
|
// nameservers, you probably want to use them as forwarders.
|
||||||
|
// Uncomment the following block, and insert the addresses replacing
|
||||||
|
// the all-0's placeholder.
|
||||||
|
|
||||||
|
// forwarders {
|
||||||
|
// 0.0.0.0;
|
||||||
|
// };
|
||||||
|
|
||||||
|
//========================================================================
|
||||||
|
// If BIND logs error messages about the root key being expired,
|
||||||
|
// you will need to update your keys. See https://www.isc.org/bind-keys
|
||||||
|
//========================================================================
|
||||||
|
dnssec-validation auto;
|
||||||
|
|
||||||
|
listen-on-v6 port 53 { any; };
|
||||||
|
};
|
28
bind9/compose.yaml
Normal file
28
bind9/compose.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
install_site:
|
||||||
|
build: install_site
|
||||||
|
environment:
|
||||||
|
- BASE_URL
|
||||||
|
- EMAIL
|
||||||
|
volumes:
|
||||||
|
- ./nginx.conf:/web/bind9.conf
|
||||||
|
- sites:/sites/
|
||||||
|
- certs:/etc/letsencrypt/
|
||||||
|
- certbotroot:/var/www/certbot/
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|
||||||
|
bind9:
|
||||||
|
build: .
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "53:53"
|
||||||
|
volumes:
|
||||||
|
- cache:/cache/
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
certs:
|
||||||
|
external: true
|
||||||
|
certbotroot:
|
||||||
|
external: true
|
||||||
|
cache:
|
20
bind9/nginx.conf
Normal file
20
bind9/nginx.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name $BASE_URL;
|
||||||
|
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
listen [::]:443 ssl;
|
||||||
|
server_name $BASE_URL;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://bind9:80;
|
||||||
|
}
|
||||||
|
}
|
@ -1023,7 +1023,7 @@ engines:
|
|||||||
engine: lingva
|
engine: lingva
|
||||||
shortcut: lv
|
shortcut: lv
|
||||||
# set lingva instance in url, by default it will use the official instance
|
# set lingva instance in url, by default it will use the official instance
|
||||||
# url: https://lingva.ml
|
# url: https://lingva.thedaviddelta.com/
|
||||||
|
|
||||||
- name: lobste.rs
|
- name: lobste.rs
|
||||||
engine: xpath
|
engine: xpath
|
||||||
|
Loading…
Reference in New Issue
Block a user