My problem is that the https endpoint /dns-query is not working.
Example:
# Working example using Google DNS
curl --doh-url https://dns.google/dns-query https://github.com/404
# Failling when I tried to run on my app
# I prefer to not public share the real app URL
curl --doh-url https://example.fly.dev/dns-query https://github.com/404
# curl: (6) Couldn't resolve host name
# Using DIG also does not work
dig @example.fly.dev +https github.com
I had to remove the handlers from services.ports. So, I am able to use my own certificate.
Also, the UDP ports need to be the same for external and internal (Running Fly Apps On UDP and TCP · Fly Docs)
Final Dockerfile:
FROM adguard/adguardhome:latest as base
EXPOSE 80 443/tcp 443/udp 853/tcp 853/udp
RUN mkdir -p /opt/adguardhome/conf && \
mkdir -p /opt/adguardhome/work && \
mkdir -p /certificate
COPY certificate /certificate
COPY AdGuardHome.yaml /opt/adguardhome/conf/AdGuardHome.yaml