From b1353e36f4dab7a09fff4c250194adf1df1ab5ce Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Wed, 18 Aug 2021 19:26:59 +0900 Subject: [PATCH] create dns.keiu.net --- docker-compose.yml | 7 +++++++ etc/caddy/Caddyfile | 3 +++ etc/coredns/Corefile | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 etc/coredns/Corefile diff --git a/docker-compose.yml b/docker-compose.yml index c5e4097..dad815f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,6 +35,13 @@ services: volumes: - postgres_tmp:/var/run/postgresql - postgres_data:/var/lib/postgresql/data + dns.keiu.net: + image: coredns/coredns:1.8.4 + restart: unless-stopped + expose: ["443"] + volumes: + - ./etc/coredns/Corefile:/Corefile + - caddy_data:/var/lib/caddy/data volumes: caddy_data: caddy_config: diff --git a/etc/caddy/Caddyfile b/etc/caddy/Caddyfile index fcb1f9b..962303d 100644 --- a/etc/caddy/Caddyfile +++ b/etc/caddy/Caddyfile @@ -7,3 +7,6 @@ www.keiu.net { minicharge.keiu.net { reverse_proxy unix//tmp/minicharge/miniflux.sock } +dns.keiu.net { + reverse_proxy https://dns.keiu.net +} diff --git a/etc/coredns/Corefile b/etc/coredns/Corefile new file mode 100644 index 0000000..c8722b1 --- /dev/null +++ b/etc/coredns/Corefile @@ -0,0 +1,4 @@ +https://. { + tls /var/lib/caddy/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/dns.keiu.net/dns.keiu.net.crt /var/lib/caddy/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/dns.keiu.net/dns.keiu.net.key + forward . /etc/resolv.conf +}