From a0f01dde1a501798b6ee1900561716d1eebd3057 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Fri, 12 Jan 2024 17:35:01 +0000 Subject: [PATCH] Added persistent IPs --- networks.yaml | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/networks.yaml b/networks.yaml index bfb940b..5902448 100644 --- a/networks.yaml +++ b/networks.yaml @@ -1,7 +1,26 @@ version: "3.8" services: - # We want our network to be managed by traefik, so we need to add it as a service + # We want to add coredns, as a local NDS server/cache which pulls from as many sources as possible + coredns: + image: coredns/coredns:latest + ports: + - "53:53" + - "53:53/udp" + volumes: + - networks_coredns:/etc/coredns + deploy: + replicas: 1 + restart_policy: + condition: on-failure + networks: + i-form_research_server_stack: + ipv4_address: "172.252.0.2" + labels: + - "traefik.enable=true" + - "traefik.http.routers.go.rule=Path(`/`)" + - "traefik.http.services.go.loadbalancer.server.port=53" + # We also want our network to be managed by traefik, so we need to add it as a service # Traefik provides load balancing and reverse proxying for our services traefik: image: traefik:latest @@ -33,28 +52,11 @@ services: restart_policy: condition: on-failure networks: - - i-form_research_server_stack + i-form_research_server_stack: + ipv4_address: "172.252.0.3" # secrets: # - traefik_cert # - traefik_key - # We also want to add coredns, as a local NDS server/cache which pulls from as many sources as possible - coredns: - image: coredns/coredns:latest - ports: - - "53:53" - - "53:53/udp" - volumes: - - networks_coredns:/etc/coredns - deploy: - replicas: 1 - restart_policy: - condition: on-failure - networks: - - i-form_research_server_stack - labels: - - "traefik.enable=true" - - "traefik.http.routers.go.rule=Path(`/`)" - - "traefik.http.services.go.loadbalancer.server.port=53" networks: i-form_research_server_stack: