🏡 index : github.com/captn3m0/nebula.git

author Nemo <me@captnemo.in> 2019-03-31 17:09:43.0 +05:30:00
committer Nemo <me@captnemo.in> 2019-03-31 17:09:43.0 +05:30:00
commit
0ce0753d5f6232f5eeb292aa5b17f4e628935ecc [patch]
tree
cb5d7e826331475e0a06ea3670607c92c7a6f3c2
parent
ff3b56231bb6ea68a8814fcfae16545b3ea32a1a
download
0ce0753d5f6232f5eeb292aa5b17f4e628935ecc.tar.gz

turn off dnscrypt-proxy, client now runs on the Router



Diff

 dnscrypt-proxy.tf | 29 -----------------------------
 pihole.tf         | 54 ------------------------------------------------------
 rss-bridge.tf     |  2 +-
 media/emby.tf     |  4 ----
 media/radarr.tf   |  4 ----
 5 files changed, 1 insertion(+), 92 deletions(-)

diff --git a/dnscrypt-proxy.tf b/dnscrypt-proxy.tf
deleted file mode 100644
index 1b2e466..0000000 100644
--- a/dnscrypt-proxy.tf
+++ /dev/null
@@ -1,29 +1,0 @@
// This is a completely isolated container
// used by pihole
module "dnscrypt" {

  name   = "dnscrypt-proxy"
  source = "modules/container"

  image = "mattbodholdt/dnscrypt-proxy"

  restart = "always"

  networks_advanced = [{

    name         = "dns"
    aliases      = ["dnscrypt", "dnscrypt-proxy"]
    ipv4_address = "172.30.0.2"
  }]

  dns = ["127.0.0.1"]
}

resource "docker_network" "dns" {

  name     = "dns"
  internal = false

  // 172.20.0.12 - 172.20.0.15
  ipam_config {

    subnet  = "172.30.0.0/29"
    gateway = "172.30.0.1"
  }
}
diff --git a/pihole.tf b/pihole.tf
deleted file mode 100644
index 35b764e..0000000 100644
--- a/pihole.tf
+++ /dev/null
@@ -1,54 +1,0 @@
module "pihole" {

  name   = "pihole"
  source = "modules/container"

  web {

    expose = true
    port   = "80"
    host   = "dns.in.${var.root-domain}"
  }

  restart = "always"

  image = "pihole/pihole"

  ports = [{

    internal = "53"
    external = "53"
    ip       = "192.168.1.111"
    protocol = "udp"
  }]

  env = [

    "ServerIP=192.168.1.111",
    "WEBPASSWORD=${data.pass_password.pihole_password.password}",
    "DNS1=172.30.0.2",
    "DNS2=no",
    "VIRTUAL_HOST=dns.in.${var.root-domain}",
  ]

  volumes = [

    {
      host_path      = "/mnt/xwing/config/pihole"
      container_path = "/etc/pihole"
    },
    {
      host_path      = "/mnt/xwing/config/pihole-dnsmasq.d"
      container_path = "/etc/dnsmasq.d"
    },
  ]

  networks_advanced = [{

    name = "dns"
  },
    {
      name = "traefik"
    },
  ]

  capabilities = [{

    add = ["NET_ADMIN"]
  }]

  dns = ["127.0.0.1", "9.9.9.9", "1.1.1.1"]
}
diff --git a/rss-bridge.tf b/rss-bridge.tf
index 554847c..3978634 100644
--- a/rss-bridge.tf
+++ a/rss-bridge.tf
@@ -11,7 +11,7 @@

  networks_advanced = [

    {
      name = "bridge"
      name = "external"
    },
    {
      name = "traefik"
diff --git a/media/emby.tf b/media/emby.tf
index 3e7786c..a27ceb4 100644
--- a/media/emby.tf
+++ a/media/emby.tf
@@ -12,10 +12,6 @@
    container_path = "/media"
  }

  // TODO: Create a new separate network for DNS
  // and use that instead
  dns = ["192.168.1.111"]

  labels = "${merge(

    var.traefik-labels,
    map(
diff --git a/media/radarr.tf b/media/radarr.tf
index 0b0e6e1..d7b7095 100644
--- a/media/radarr.tf
+++ a/media/radarr.tf
@@ -5,10 +5,6 @@

  networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"

  // TODO: Create a new separate network for DNS
  // and use that instead
  dns = ["192.168.1.111"]

  web {

    expose = true
    port   = 7878