From f17527d2393ec89ae7b71ad229e8b405036484c7 Mon Sep 17 00:00:00 2001 From: jon r Date: Sat, 7 Sep 2024 14:48:30 +0200 Subject: [PATCH] chore(docker): move networking configuration down one level --- docker/{ => etc/dnsmasq}/dnsmasq.conf | 11 ++++++--- docker/{ => etc/dnsmasq}/funkwhale.test.conf | 0 docker/etc/traefik/traefik.yml | 19 ++++++++++++++ docker/traefik.toml | 26 -------------------- 4 files changed, 27 insertions(+), 29 deletions(-) rename docker/{ => etc/dnsmasq}/dnsmasq.conf (91%) rename docker/{ => etc/dnsmasq}/funkwhale.test.conf (100%) create mode 100644 docker/etc/traefik/traefik.yml delete mode 100644 docker/traefik.toml diff --git a/docker/dnsmasq.conf b/docker/etc/dnsmasq/dnsmasq.conf similarity index 91% rename from docker/dnsmasq.conf rename to docker/etc/dnsmasq/dnsmasq.conf index c7e9a2211..4cdfd4b0a 100644 --- a/docker/dnsmasq.conf +++ b/docker/etc/dnsmasq/dnsmasq.conf @@ -1,7 +1,9 @@ port=53 -# Using dnsmasq only for DNS resolution, not its DHCP server. -no-dhcp-interface=eth0 +bind-interfaces + +# Bind to default Docker bridge +listen-address=172.17.0.1 # If you don't want dnsmasq to read /etc/hosts, uncomment the following line. no-hosts @@ -34,8 +36,11 @@ proxy-dnssec user=dnsmasq group=nogroup -bind-interfaces log-queries +cache-size=10000 + +server=9.9.9.9 +server=1.1.1.1 # Include all files in a directory which end in .conf conf-dir=/etc/dnsmasq.d/,*.conf diff --git a/docker/funkwhale.test.conf b/docker/etc/dnsmasq/funkwhale.test.conf similarity index 100% rename from docker/funkwhale.test.conf rename to docker/etc/dnsmasq/funkwhale.test.conf diff --git a/docker/etc/traefik/traefik.yml b/docker/etc/traefik/traefik.yml new file mode 100644 index 000000000..64344a17e --- /dev/null +++ b/docker/etc/traefik/traefik.yml @@ -0,0 +1,19 @@ +providers: + docker: + exposedByDefault: "false" + +api: + insecure: true + +tls: + certificates: + - certFile: /ssl/traefik.crt + keyFile: /ssl/traefik.key + +entryPoints: + traefik: + address: "172.17.0.1:8008" + web: + address: "172.17.0.1:80" + webs: + address: "172.17.0.1:443" diff --git a/docker/traefik.toml b/docker/traefik.toml deleted file mode 100644 index 96641316c..000000000 --- a/docker/traefik.toml +++ /dev/null @@ -1,26 +0,0 @@ -defaultEntryPoints = ["http", "https"] -[accessLog] -################################################################ -# Web configuration backend -################################################################ -[web] -address = ":8040" -################################################################ -# Docker configuration backend -################################################################ -[docker] -domain = "funkwhale.test" -watch = true -exposedbydefault = false - -[entryPoints] - [entryPoints.http] - address = ":80" - # [entryPoints.http.redirect] - entryPoint = "http" - [entryPoints.https] - address = ":443" - [entryPoints.https.tls] - [[entryPoints.https.tls.certificates]] - certFile = "/ssl/traefik.crt" - keyFile = "/ssl/traefik.key"